org.sourceforge.jemm.client
Class Entity

java.lang.Object
  extended by org.sourceforge.jemm.client.Entity

public class Entity
extends java.lang.Object

An Entity is a JEMMObject representation that allows low level access to the fields, methods and constructors. This interfaces implementations allows manipulation of a JEMMObject and have intricate knowledge of what the compiler has added to the JEMMObject entities.

Author:
Paul Keeble

Constructor Summary
Entity(JEMMObject obj)
           
 
Method Summary
 java.lang.Object getField(FieldKey fkey)
          Gets the field as it is on the JEMMObject, without consulting the ShadowMap
 FieldType getFieldType(FieldKey fKey)
          Determines the Type of a field.
 ID getID()
          Returns the ID of the JEMMObject as held by the ShadowObject
 ShadowData getShadowData()
           
 ShadowObject getShadowObject()
          Returns the referenced ShadowObject on the Enhanced Object referenced.
 ShadowUserObject getShadowUserObject()
          Returns the referenced ShadowObject on the Enhanced Object referenced.
 int getVersion()
           
 AttributeUse[] methodUses(Descriptor methodSignature)
          Reads any Uses annotations on a method which define which fields should be initialised.
 void setField(FieldKey fkey, java.lang.Object value)
          Sets the field on the JEMMObject, without changing the ShadowMap.
 void setShadowObject(ShadowUserObject so)
          Sets the ShadowObject that is defined on underlying object
 void setVersion(int newVersion)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Entity

public Entity(JEMMObject obj)
Method Detail

getShadowUserObject

public ShadowUserObject getShadowUserObject()
Returns the referenced ShadowObject on the Enhanced Object referenced.

Returns:
The ShadowObject the object currently uses.

getShadowObject

public ShadowObject getShadowObject()
Returns the referenced ShadowObject on the Enhanced Object referenced.

Returns:
The ShadowObject the object currently uses.

getShadowData

public ShadowData getShadowData()

getVersion

public int getVersion()

setVersion

public void setVersion(int newVersion)

setShadowObject

public void setShadowObject(ShadowUserObject so)
Sets the ShadowObject that is defined on underlying object

Parameters:
so - The new ShadowObject

getID

public ID getID()
Returns the ID of the JEMMObject as held by the ShadowObject

Returns:
The ID of the object

setField

public void setField(FieldKey fkey,
                     java.lang.Object value)
Sets the field on the JEMMObject, without changing the ShadowMap. In a hierarchy of classes the sae field can be declared multiple times. A private field for instance is not overriden in the sub classes

Parameters:
className - The name of the class that declares the field
fieldName - The name of the field to access
value - The value to set the field to

getField

public java.lang.Object getField(FieldKey fkey)
Gets the field as it is on the JEMMObject, without consulting the ShadowMap

Parameters:
className -
fieldName -

getFieldType

public FieldType getFieldType(FieldKey fKey)
Determines the Type of a field.

Parameters:
fKey - The unique identifying key for a field
Returns:
The Type of the field

methodUses

public AttributeUse[] methodUses(Descriptor methodSignature)
Reads any Uses annotations on a method which define which fields should be initialised.

Parameters:
methodSignature - The method to read the annotations from./
Returns:
The names of the methods


Copyright © 2009. All Rights Reserved.