aspoev.interpreter.base
Class CompositeObject

java.lang.Object
  extended byaspoev.interpreter.base.MetaObject
      extended byaspoev.interpreter.base.CompositeObject
All Implemented Interfaces:
pJ.jasmine.PRI, java.io.Serializable

public class CompositeObject
extends MetaObject
implements pJ.jasmine.PRI

See Also:
Serialized Form

Field Summary
protected  MetaObject core
           
protected  pJ.jasmine.ListOfObject subObjectList
           
 
Fields inherited from class aspoev.interpreter.base.MetaObject
declarationType, type
 
Fields inherited from interface pJ.jasmine.PRI
DELETECHANGE, MODIFYCHANGE, NOCHANGE
 
Constructor Summary
CompositeObject(MetaObject core, MetaObject slice)
           
 
Method Summary
 void addSubObject(MetaObject subObject)
           
 void bringToSurface(MetaObject surface)
           
 boolean canEmulateType(TypeReferenceElement type)
          Returns true if this object already has the infrastructure to support conversion to the specified type.
 void emulateType(TypeReferenceElement type)
          This method should only be called if 'canEmulateType' evaluates to true.
 java.util.Collection getFieldNames()
          Returns a collection of the names of all fields defined on this object.
 java.lang.Object getFieldValue(java.lang.String fieldName)
          To maintain the Meta Object interface.
 MetaObject getMaskedFieldObject(java.lang.String fieldName)
          Returns the first non-FieldMask object which holds a field of the given name.
 java.lang.Object getMaskedFieldValue(java.lang.String fieldName)
          Gets the value of a field that is masked.
protected  MetaObject getSubObject(java.lang.String fieldName)
           
 boolean hasMaskedField(java.lang.String fieldName)
           
 void maskFields(FieldMask mask)
           
 void setFieldValue(java.lang.String fieldName, java.lang.Object value)
          Sets the value of the specified field to the specified value.
 void setMaskedFieldValue(java.lang.String fieldName, java.lang.Object 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.
 
Methods inherited from class aspoev.interpreter.base.MetaObject
equals, getClassDeclaration, getFieldType, hasField, toShortString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

core

protected MetaObject core

subObjectList

protected pJ.jasmine.ListOfObject subObjectList
Constructor Detail

CompositeObject

public CompositeObject(MetaObject core,
                       MetaObject slice)
Method Detail

addSubObject

public void addSubObject(MetaObject subObject)

bringToSurface

public void bringToSurface(MetaObject surface)

canEmulateType

public boolean canEmulateType(TypeReferenceElement type)
Returns true if this object already has the infrastructure to support conversion to the specified type.


emulateType

public void emulateType(TypeReferenceElement type)
This method should only be called if 'canEmulateType' evaluates to true. ie., this method assumes the correct structures are in place for the type.


getFieldNames

public java.util.Collection getFieldNames()
Description copied from class: MetaObject
Returns a collection of the names of all fields defined on this object.

Overrides:
getFieldNames in class MetaObject

getFieldValue

public java.lang.Object getFieldValue(java.lang.String fieldName)
                               throws java.lang.Exception
To maintain the Meta Object interface.

Overrides:
getFieldValue in class MetaObject
Throws:
java.lang.Exception

getMaskedFieldObject

public MetaObject getMaskedFieldObject(java.lang.String fieldName)
Returns the first non-FieldMask object which holds a field of the given name. Returns null if the field is not in the composite object.


getMaskedFieldValue

public java.lang.Object getMaskedFieldValue(java.lang.String fieldName)
                                     throws java.lang.Exception
Gets the value of a field that is masked. If the field doesn't exist, null is returned - no exception is thrown.

Throws:
java.lang.Exception

getSubObject

protected MetaObject getSubObject(java.lang.String fieldName)

hasMaskedField

public boolean hasMaskedField(java.lang.String fieldName)

maskFields

public void maskFields(FieldMask mask)

setFieldValue

public void setFieldValue(java.lang.String fieldName,
                          java.lang.Object value)
                   throws java.lang.Exception
Description copied from class: MetaObject
Sets the value of the specified field to the specified value.

Overrides:
setFieldValue in class MetaObject
Throws:
java.lang.Exception

setMaskedFieldValue

public void setMaskedFieldValue(java.lang.String fieldName,
                                java.lang.Object value)
                         throws java.lang.Exception
Throws:
java.lang.Exception

toLongString

public java.lang.String toLongString()
Description copied from class: MetaObject
Returns an extended String representation of the object

Overrides:
toLongString in class MetaObject

toLongString

public java.lang.String toLongString(int level)
Description copied from class: MetaObject
Returns an extended String representation of the object, indented to the specified level.

Overrides:
toLongString in class MetaObject