NatureExtendable
, PropertyHolder
, ClassDescriptor
public class ClassDescriptorImpl extends java.lang.Object implements ClassDescriptor
ClassDescriptor
implementation, holding general OO information
about the class described.
Engines will use Nature
s 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
FieldDescriptor s 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
FieldDescriptor s that describe the fields defined for this class. |
void |
setIdentities(FieldDescriptor[] identities) |
Sets the
FieldDescriptor s 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 ClassDescriptor
ClassDescriptor.getJavaClass()
public void setExtends(ClassDescriptor extend)
extend
- the descriptor of the class which this class extends.public ClassDescriptor getExtends()
getExtends
in interface ClassDescriptor
ClassDescriptor.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)
FieldDescriptor
s that describe the fields defined for this class.fields
- the FieldDescriptor
s that describe the fields defined for this class.public FieldDescriptor[] getFields()
getFields
in interface ClassDescriptor
ClassDescriptor.getFields()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.Object getProperty(java.lang.String name)
PropertyHolder
getProperty
in interface PropertyHolder
name
- of the propertypublic void setProperty(java.lang.String name, java.lang.Object value)
PropertyHolder
setProperty
in interface PropertyHolder
name
- of the propertyvalue
- of the propertypublic void addNature(java.lang.String nature)
NatureExtendable
addNature
in interface NatureExtendable
nature
- ID of the Naturepublic boolean hasNature(java.lang.String nature)
NatureExtendable
hasNature
in interface NatureExtendable
nature
- ID of the Naturepublic void setIdentities(FieldDescriptor[] identities)
FieldDescriptor
s that describe the identities as defined for this class.identities
- the FieldDescriptor
s that describe the identities as defined
for this class.public FieldDescriptor[] getIdentities()
FieldDescriptor
s that describe the identities as defined for this class.FieldDescriptor
s that describe the identities as defined for this class.public FieldDescriptor getIdentity()
FieldDescriptor
instance.getIdentity
in interface ClassDescriptor
FieldDescriptor
instanceIntalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com