au.com.swz.jatlom
Class VarDesc

java.lang.Object
  extended by au.com.swz.jatlom.VarDesc

public class VarDesc
extends java.lang.Object

Describes a variable, constant, or data member.

Author:
Mark Richter

Constructor Summary
VarDesc()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Checks this variable with equality to the specified object.
 boolean equals(VarDesc varDesc)
          Checks this variable with equality to the specified variable.
 Variant getConstantValue()
          If getKind() == VAR_CONST this method returns the constant value defined.
 java.lang.String getDocumentation()
          Returns the documentation string for this variable.
 int getHelpContext()
          Returns the Help context identifier (ID) associated with this variable.
 java.lang.String getHelpFile()
          Provides the fully qualified name of the Help file for this variable.
 int getMemberId()
          Returns the Member/Disp Id of this variable.
 java.lang.String getName()
          Provides the name of this variable.
 long getPerInstanceOffset()
          If getKind() == VAR_PERINSTANCE this method returns the offset of this variable within the instance.
 TypeDesc getTypeDesc()
          Provides the type of variable.
 VarKind getVarKind()
          Provides the kind of variable.
 boolean isBindable()
          Determines if this variable supports data binding.
 boolean isDefaultBind()
          Deteremines if the variable is the single property that best represents the object.
 boolean isDefaultCollectionElement()
          Determines if this variable is the default collection element.
 boolean isDisplayBind()
          Determines if the variable is displayed to the user as bindable.
 boolean isHidden()
          Determine if the variable should not be displayed to the user in a browser, although it exists and is bindable.
 boolean isImmediateBind()
          Determines if the variable is mapped as individual bindable properties.
 boolean isNonBrowseable()
          Determines if the variable should appear in an object browser, but not in a properties browser.
 boolean isReadOnly()
          Determines if this variable is read only in which case assignment to the variable should be prevented.
 boolean isReplaceable()
          Determines if this variable has default behaviors.
 boolean isRequestEdit()
          Determines if the variable will call IPropertyNotifySink::OnRequestEdit.
 boolean isRestricted()
          Determines if the variable should not be accessible from macro languages.
 boolean isSource()
          Determine if this variable returns an object that is a source of events.
 boolean isUiDefault()
          Determines if this variable is the default display in the user interface.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

VarDesc

public VarDesc()
Method Detail

getConstantValue

public Variant getConstantValue()
If getKind() == VAR_CONST this method returns the constant value defined. For all other variable kinds this methods returns null.

Returns:
the constant value of this variable.

getDocumentation

public java.lang.String getDocumentation()
Returns the documentation string for this variable. This can be null if the variable does not specifiy any documentation.

Returns:
the documentation string for this variable.

getHelpContext

public int getHelpContext()
Returns the Help context identifier (ID) associated with this variable.

Returns:
the Help context identifier (ID) associated with this variable.

getHelpFile

public java.lang.String getHelpFile()
Provides the fully qualified name of the Help file for this variable. This value can be null if this variable does not define a help file.

Returns:
the fully qualified name of the Help file for this variable.

getName

public java.lang.String getName()
Provides the name of this variable.

Returns:
the name of this variable.

getVarKind

public VarKind getVarKind()
Provides the kind of variable.

Returns:
the kind of variable.

getTypeDesc

public TypeDesc getTypeDesc()
Provides the type of variable.

Returns:
the type of variable.

getMemberId

public int getMemberId()
Returns the Member/Disp Id of this variable. This value can be passed to the IDispath.invoke method in order to get/set the value of this variable.

Returns:
the Member/Disp Id of this variable.

getPerInstanceOffset

public long getPerInstanceOffset()
If getKind() == VAR_PERINSTANCE this method returns the offset of this variable within the instance. For all other variable kinds this methods returns 0.

Returns:
the offset of this variable within the instance.

isBindable

public boolean isBindable()
Determines if this variable supports data binding.

Returns:
true if this variable supports data binding.

isDefaultBind

public boolean isDefaultBind()
Deteremines if the variable is the single property that best represents the object. Only one variable in a type information can have this attribute.

Returns:
true if the variable is the single property that best represents the object.

isDefaultCollectionElement

public boolean isDefaultCollectionElement()
Determines if this variable is the default collection element. This permits an optimization in which the compiler looks for a member named "xyz" on the type of abc. If such a member is found and is flagged as an accessor function for an element of the default collection, then a call is generated to that member function. Permitted on members in dispinterfaces and interfaces; not permitted on modules.

Returns:
true if this variable is the default collection element.

isDisplayBind

public boolean isDisplayBind()
Determines if the variable is displayed to the user as bindable. The isBindable must also return true.

Returns:
if the variable is displayed to the user as bindable.

isHidden

public boolean isHidden()
Determine if the variable should not be displayed to the user in a browser, although it exists and is bindable.

Returns:
true if the variable should not be displayed to the user in a browser.

isImmediateBind

public boolean isImmediateBind()
Determines if the variable is mapped as individual bindable properties.

Returns:
true if the variable is mapped as individual bindable properties.

isNonBrowseable

public boolean isNonBrowseable()
Determines if the variable should appear in an object browser, but not in a properties browser.

Returns:
true if the variable should not appear in a properties browser.

isReadOnly

public boolean isReadOnly()
Determines if this variable is read only in which case assignment to the variable should be prevented.

Returns:
true if this variable is read only.

isReplaceable

public boolean isReplaceable()
Determines if this variable has default behaviors.

Returns:
true if this variable has default behaviors.

isRequestEdit

public boolean isRequestEdit()
Determines if the variable will call IPropertyNotifySink::OnRequestEdit. if true then any attempt to directly change the property results in a call to IPropertyNotifySink::OnRequestEdit. The implementation of OnRequestEdit determines if the change is accepted.

Returns:
true if the variable will call IPropertyNotifySink::OnRequestEdit.

isRestricted

public boolean isRestricted()
Determines if the variable should not be accessible from macro languages. This flag is intended for system-level variables or variables that you do not want type browsers to display.

Returns:
true if the variable should not be accessible from macro languages.

isSource

public boolean isSource()
Determine if this variable returns an object that is a source of events.

Returns:
true if this variable returns an object that is a source of events.

isUiDefault

public boolean isUiDefault()
Determines if this variable is the default display in the user interface.

Returns:
true if this variable is the default display in the user interface.

equals

public boolean equals(java.lang.Object obj)
Checks this variable with equality to the specified object. If the object is not of type VarDesc then this method returns false.

Overrides:
equals in class java.lang.Object
Returns:
true if this object equals the specified object.

equals

public boolean equals(VarDesc varDesc)
Checks this variable with equality to the specified variable. If all fields in the specified variable are identical to this one then this method returns true otherwise it returns false.

Returns:
true if all fields in the specified variable are identical to this one.