NatureExtendable, PropertyHolder, ClassDescriptorpublic class ClassDescriptorImpl extends java.lang.Object implements ClassDescriptor
ClassDescriptor implementation, holding general OO information
about the class described.
Engines will use Natures to augment this class with engine-specific knowledge
and functionality, using addNature(String) to register these views
with this class.
Once a Nature has been registered with this ClassDescriptor, the nature
can be applied to the ClassDescriptor and nature-specific properties
can be accessed in a type-safe way.Nature,
addNature(String),
hasNature(String)| Constructor | Description |
|---|---|
ClassDescriptorImpl() |
| Modifier and Type | Method | Description |
|---|---|---|
void |
addNature(java.lang.String nature) |
Adds a specified nature.
|
ClassDescriptor |
getDepends() |
Returns the
ClassDescriptor of the class which this class
depends upon. |
ClassDescriptor |
getExtends() |
Returns the class descriptor of the class extended by this class.
|
FieldDescriptor[] |
getFields() |
Returns a list of fields represented by this descriptor.
|
FieldDescriptor[] |
getIdentities() |
Returns the
FieldDescriptors that describe the identities as defined for this class. |
FieldDescriptor |
getIdentity() |
Returns the first
FieldDescriptor instance. |
java.lang.Class<?> |
getJavaClass() |
Returns the Java class represented by this descriptor.
|
ClassMapping |
getMapping() |
Returns the
ClassMapping instance used. |
java.lang.Object |
getProperty(java.lang.String name) |
Get a property by its name.
|
boolean |
hasNature(java.lang.String nature) |
Checks if a specified nature has been added.
|
void |
setDepends(ClassDescriptor depends) |
Sets the
ClassDescriptor of the class which this class
depends upon. |
void |
setExtends(ClassDescriptor extend) |
Sets the descriptor of the class which this class extends.
|
void |
setFields(FieldDescriptor[] fields) |
Sets the
FieldDescriptors that describe the fields defined for this class. |
void |
setIdentities(FieldDescriptor[] identities) |
Sets the
FieldDescriptors that describe the identities as defined for this class. |
void |
setJavaClass(java.lang.Class<?> javaClass) |
Sets the Java
Class as described by this descriptor. |
void |
setMapping(ClassMapping mapping) |
Sets the
ClassMapping instance. |
void |
setProperty(java.lang.String name,
java.lang.Object value) |
Set a property specified by the name to the passed value.
|
java.lang.String |
toString() |
public void setMapping(ClassMapping mapping)
ClassMapping instance.mapping - The ClassMapping instance to be used.public ClassMapping getMapping()
ClassMapping instance used.ClassMapping instance used.public void setJavaClass(java.lang.Class<?> javaClass)
Class as described by this descriptor.javaClass - The Java Class instance as described by this descriptor.public java.lang.Class<?> getJavaClass()
getJavaClass in interface ClassDescriptorClassDescriptor.getJavaClass()public void setExtends(ClassDescriptor extend)
extend - the descriptor of the class which this class extends.public ClassDescriptor getExtends()
getExtends in interface ClassDescriptorClassDescriptor.getExtends()public void setDepends(ClassDescriptor depends)
ClassDescriptor of the class which this class
depends upon.depends - the ClassDescriptor of the class which this class
depends uponpublic ClassDescriptor getDepends()
ClassDescriptor of the class which this class
depends upon.ClassDescriptor of the class which this class
depends upon.public void setFields(FieldDescriptor[] fields)
FieldDescriptors that describe the fields defined for this class.fields - the FieldDescriptors that describe the fields defined for this class.public FieldDescriptor[] getFields()
getFields in interface ClassDescriptorClassDescriptor.getFields()public java.lang.String toString()
toString in class java.lang.ObjectObject.toString()public java.lang.Object getProperty(java.lang.String name)
PropertyHoldergetProperty in interface PropertyHoldername - of the propertypublic void setProperty(java.lang.String name,
java.lang.Object value)
PropertyHoldersetProperty in interface PropertyHoldername - of the propertyvalue - of the propertypublic void addNature(java.lang.String nature)
NatureExtendableaddNature in interface NatureExtendablenature - ID of the Naturepublic boolean hasNature(java.lang.String nature)
NatureExtendablehasNature in interface NatureExtendablenature - ID of the Naturepublic void setIdentities(FieldDescriptor[] identities)
FieldDescriptors that describe the identities as defined for this class.identities - the FieldDescriptors that describe the identities as defined
for this class.public FieldDescriptor[] getIdentities()
FieldDescriptors that describe the identities as defined for this class.FieldDescriptors that describe the identities as defined for this class.public FieldDescriptor getIdentity()
FieldDescriptor instance.getIdentity in interface ClassDescriptorFieldDescriptor instanceIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com