| com.tc.object.TCClass
All known Subclasses: com.tc.object.MockTCClass, com.tc.object.TCClassImpl,
TCClass | public interface TCClass (Code) | | Interface for peer to java.lang.Class. The Class of every object under management is represented by an instance of
TCClass. Keeping a peer of each Class object allows us to organize the class elements in useful ways and to cache
that organization so we only have to do it once per class.
Important -- It is likely that we will enforce the Serializable contract and only manage those classes which
implement Serializable.
TODO: Add support for using a serialized instance of classes with no nullary constructor to rehydrate into.
author: Orion Letizi |
Method Summary | |
public Map | connectedCopy(Object source, Object dest, Map visited, OptimisticTransactionManager txManager) | public TCObject | createTCObject(ObjectID id, Object peer) | public void | dehydrate(TCObject tcObject, DNAWriter writer, Object pojo) | public Class | getComponentType() | public Constructor | getConstructor() | public String | getDefiningLoaderDescription() | public String | getExtendingClassName() | public TCField | getField(String name) | public String | getFieldNameByOffset(long fieldOffset) | public String | getName() | public Object | getNewInstanceFromNonDefaultConstructor(DNA dna) | public ClientObjectManager | getObjectManager() | public String | getOnLoadExecuteScript() | public String | getOnLoadMethod() | public Field | getParentField() If the class is an inner class, get the field referring to the parent "this object. | public String | getParentFieldName() If the class is an inner class, get the name of the field referring to the parent "this"
object. | public Class | getPeerClass() | public TCField[] | getPortableFields() | public TraversedReferences | getPortableObjects(Object pojo, TraversedReferences addTo) | public TCClass | getSuperclass() | public boolean | hasOnLoadExecuteScript() | public boolean | hasOnLoadMethod() | public void | hydrate(TCObject tcObject, DNA dna, Object pojo, boolean force) | public boolean | isEnum() | public boolean | isIndexed() | public boolean | isLogical() | public boolean | isNonStaticInner() | public boolean | isPortableField(long fieldOffset) | public boolean | isProxyClass() | public boolean | isUseNonDefaultConstructor() |
connectedCopy | public Map connectedCopy(Object source, Object dest, Map visited, OptimisticTransactionManager txManager)(Code) | | Connects the original object to the copy object and creates new copies of referened objects but leaves them
unconnected (mostly this is about doing a deep connected clone without recurrsion so that we don't get stack
overflows
Parameters: source - Source object Parameters: dest - Copy object Parameters: visited - Note already visited objects Parameters: txManager - Transaction manager Map of original to copy key that were cloned while executing the method |
createTCObject | public TCObject createTCObject(ObjectID id, Object peer)(Code) | | Create a new TCObject
Parameters: id - The object identifier Parameters: peer - The object |
dehydrate | public void dehydrate(TCObject tcObject, DNAWriter writer, Object pojo)(Code) | | Write an object to DNA
Parameters: tcObject - The object manager Parameters: writer - The writer to write to Parameters: pojo - The instance to write |
getComponentType | public Class getComponentType()(Code) | | If this is an array, the type of array elements |
getDefiningLoaderDescription | public String getDefiningLoaderDescription()(Code) | | Name of defining classloader |
getExtendingClassName | public String getExtendingClassName()(Code) | | Returns special generated name for classes extending logical classes
Special generated logical extending class name or just the normal class name if not extending logical |
getField | public TCField getField(String name)(Code) | | Get TCField for this class
Parameters: name - Field name TCField |
getFieldNameByOffset | public String getFieldNameByOffset(long fieldOffset)(Code) | | Get a field name by offset into an index of fields
Parameters: fieldOffset - The index The fully-qualified field name at that index |
getName | public String getName()(Code) | | Name of peer or proxy class |
getOnLoadExecuteScript | public String getOnLoadExecuteScript()(Code) | | Get script to execute on load
Execute script |
getOnLoadMethod | public String getOnLoadMethod()(Code) | | Get name of method to execute on load
Method name |
getParentField | public Field getParentField()(Code) | | If the class is an inner class, get the field referring to the parent "this object.
The field referring to the parent this |
getParentFieldName | public String getParentFieldName()(Code) | | If the class is an inner class, get the name of the field referring to the parent "this"
object.
The field name referring to the parent this |
getPeerClass | public Class getPeerClass()(Code) | | Get the class this TCClass is a peer for
Peer class, never null |
getPortableFields | public TCField[] getPortableFields()(Code) | | Get all portable fields in the class
Fields, never null |
getPortableObjects | public TraversedReferences getPortableObjects(Object pojo, TraversedReferences addTo)(Code) | | Traverse a graph of objects to find the portable ones
Parameters: pojo - The object to walk Parameters: addTo - The traversed references collected so far The addTo collection |
getSuperclass | public TCClass getSuperclass()(Code) | | TCClass of the super class of the peer |
hasOnLoadExecuteScript | public boolean hasOnLoadExecuteScript()(Code) | | Determine whether this class has a BeanShell script to execute on class load
True if has script |
hasOnLoadMethod | public boolean hasOnLoadMethod()(Code) | | Determine whether this class has a method to execute on class loade
True if has load method |
hydrate | public void hydrate(TCObject tcObject, DNA dna, Object pojo, boolean force) throws IOException, ClassNotFoundException(Code) | | Reconstitute object from DNA
Parameters: tcObject - The object manager Parameters: dna - The DNA to read Parameters: pojo - The new instance of the pojo to reconstitute (will be modified) Parameters: force - Set to true to force an update to the DNA version, regardless of the local version |
isEnum | public boolean isEnum()(Code) | | True if this is an enum |
isIndexed | public boolean isIndexed()(Code) | | True if this is an array and indexed |
isLogical | public boolean isLogical()(Code) | | True if this is a logically instrumented class |
isNonStaticInner | public boolean isNonStaticInner()(Code) | | True if this is a non-static inner class and has a parent |
isPortableField | public boolean isPortableField(long fieldOffset)(Code) | | Returns true if the field represented by the offset is a portable field, i.e., not static and not dso transient
Parameters: fieldOffset - The index true if the field is portable and false otherwise |
isProxyClass | public boolean isProxyClass()(Code) | | True if this class uses a proxy class |
isUseNonDefaultConstructor | public boolean isUseNonDefaultConstructor()(Code) | | True if should use a non-default constructor when creating new instances |
|
|