|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectaspoev.interpreter.base.MetaObject
This class is more or less just a map for instance variable members. A MetaObject is an 'instance' of a ClassDeclarationElement. However, since classes inevitably change in a schema evolution scenario, the MetaObject is not bound to any one Class Declaration, or class definition. A MetaObject has two types, an active type (the type it is being used as at the moment) and its declaration type (the type it was assigned on creation), and therefore has some knowledge about how itshould be treated. It does not know about which fields it does or does not have - Its final behavior is decided by the Class Declaration determined by it's type. In practice, this metaobject could be viewed as an object of any type, though type checking would not allow this.
| Field Summary | |
protected TypeReferenceElement |
declarationType
|
protected TypeReferenceElement |
type
|
| Fields inherited from interface pJ.jasmine.PRI |
DELETECHANGE, MODIFYCHANGE, NOCHANGE |
| Constructor Summary | |
MetaObject()
|
|
MetaObject(TypeReferenceElement type)
|
|
| Method Summary | |
boolean |
equals(java.lang.Object other)
|
ClassDeclarationElement |
getClassDeclaration()
Returns the meta class that this meta object is an instance of. |
java.util.Collection |
getFieldNames()
Returns a collection of the names of all fields defined on this object. |
TypeReferenceElement |
getFieldType(java.lang.String fieldName)
Returns the type of the specfied field. |
java.lang.Object |
getFieldValue(java.lang.String fieldName)
Either a number (Double), a string (String), an object (MetaObject), or a reference (VariableReferenceElement). |
boolean |
hasField(java.lang.String name)
Returns true if this object has a field of the specified name. |
void |
setFieldValue(java.lang.String fieldName,
java.lang.Object value)
Sets the value of the specified field to the specified value. |
java.lang.String |
toLongString()
Returns an extended String representation of the object |
java.lang.String |
toLongString(int level)
Returns an extended String representation of the object, indented to the specified level. |
java.lang.String |
toShortString()
Returns a short description of the object. |
java.lang.String |
toString()
Returns a string description of the object. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected TypeReferenceElement declarationType
protected TypeReferenceElement type
| Constructor Detail |
public MetaObject()
public MetaObject(TypeReferenceElement type)
| Method Detail |
public boolean equals(java.lang.Object other)
public ClassDeclarationElement getClassDeclaration()
public java.util.Collection getFieldNames()
public TypeReferenceElement getFieldType(java.lang.String fieldName)
throws java.lang.Exception
java.lang.Exception
public java.lang.Object getFieldValue(java.lang.String fieldName)
throws java.lang.Exception
java.lang.Exceptionpublic boolean hasField(java.lang.String name)
public void setFieldValue(java.lang.String fieldName,
java.lang.Object value)
throws java.lang.Exception
java.lang.Exceptionpublic java.lang.String toLongString()
public java.lang.String toLongString(int level)
public java.lang.String toShortString()
public java.lang.String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||