Class ClassDescriptorImpl
java.lang.Object
org.exolab.castor.mapping.loader.ClassDescriptorImpl
- All Implemented Interfaces:
NatureExtendable,PropertyHolder,ClassDescriptor
The standard
s to augment this class with engine-specific knowledge
and functionality, using
ClassDescriptor implementation, holding general OO information
about the class described.
Engines will use
invalid reference
Nature
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.- Version:
- $Revision: 8727 $ $Date: 2006-01-07 15:48:31 -0700 (Sat, 07 Jan 2006) $
- Author:
- Assaf Arkin, Ralf Joachim, Werner Guttmann
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds a specified nature.Returns theClassDescriptorof the class which this class depends upon.Returns the class descriptor of the class extended by this class.Returns a list of fields represented by this descriptor.Returns theFieldDescriptors that describe the identities as defined for this class.Returns the firstFieldDescriptorinstance.Class<?> Returns the Java class represented by this descriptor.Returns theClassMappinginstance used.getProperty(String name) Get a property by its name.booleanChecks if a specified nature has been added.voidsetDepends(ClassDescriptor depends) Sets theClassDescriptorof the class which this class depends upon.voidsetExtends(ClassDescriptor extend) Sets the descriptor of the class which this class extends.voidsetFields(FieldDescriptor[] fields) Sets theFieldDescriptors that describe the fields defined for this class.voidsetIdentities(FieldDescriptor[] identities) Sets theFieldDescriptors that describe the identities as defined for this class.voidsetJavaClass(Class<?> javaClass) Sets the JavaClassas described by this descriptor.voidsetMapping(ClassMapping mapping) Sets theClassMappinginstance.voidsetProperty(String name, Object value) Set a property specified by the name to the passed value.toString()
-
Constructor Details
-
ClassDescriptorImpl
public ClassDescriptorImpl()
-
-
Method Details
-
setMapping
Sets theClassMappinginstance.- Parameters:
mapping- TheClassMappinginstance to be used.
-
getMapping
Returns theClassMappinginstance used.- Returns:
- The
ClassMappinginstance used.
-
setJavaClass
-
getJavaClass
Returns the Java class represented by this descriptor.- Specified by:
getJavaClassin interfaceClassDescriptor- Returns:
- The Java class
- See Also:
-
setExtends
Sets the descriptor of the class which this class extends.- Parameters:
extend- the descriptor of the class which this class extends.
-
getExtends
Returns the class descriptor of the class extended by this class.- Specified by:
getExtendsin interfaceClassDescriptor- Returns:
- The extended class descriptor
- See Also:
-
setDepends
Sets theClassDescriptorof the class which this class depends upon.- Parameters:
depends- theClassDescriptorof the class which this class depends upon
-
getDepends
Returns theClassDescriptorof the class which this class depends upon.- Returns:
- the
ClassDescriptorof the class which this class depends upon.
-
setFields
Sets theFieldDescriptors that describe the fields defined for this class.- Parameters:
fields- theFieldDescriptors that describe the fields defined for this class.
-
getFields
Returns a list of fields represented by this descriptor.- Specified by:
getFieldsin interfaceClassDescriptor- Returns:
- A list of fields
- See Also:
-
toString
-
getProperty
Description copied from interface:PropertyHolderGet a property by its name.- Specified by:
getPropertyin interfacePropertyHolder- Parameters:
name- of the property- Returns:
- value of the property
-
setProperty
Description copied from interface:PropertyHolderSet a property specified by the name to the passed value.- Specified by:
setPropertyin interfacePropertyHolder- Parameters:
name- of the propertyvalue- of the property
-
addNature
Description copied from interface:NatureExtendableAdds a specified nature.- Specified by:
addNaturein interfaceNatureExtendable- Parameters:
nature- ID of the Nature
-
hasNature
Description copied from interface:NatureExtendableChecks if a specified nature has been added.- Specified by:
hasNaturein interfaceNatureExtendable- Parameters:
nature- ID of the Nature- Returns:
- true if the Nature ID was added.
-
setIdentities
Sets theFieldDescriptors that describe the identities as defined for this class.- Parameters:
identities- theFieldDescriptors that describe the identities as defined for this class.
-
getIdentities
Returns theFieldDescriptors that describe the identities as defined for this class.- Returns:
- the
FieldDescriptors that describe the identities as defined for this class.
-
getIdentity
Returns the firstFieldDescriptorinstance.- Specified by:
getIdentityin interfaceClassDescriptor- Returns:
- the first
FieldDescriptorinstance
-