Package org.exolab.castor.mapping.loader
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$ $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 TypeMethodDescriptionvoid
Adds a specified nature.Returns theClassDescriptor
of 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 theFieldDescriptor
s that describe the identities as defined for this class.Returns the firstFieldDescriptor
instance.Class
<?> Returns the Java class represented by this descriptor.Returns theClassMapping
instance used.getProperty
(String name) Get a property by its name.boolean
Checks if a specified nature has been added.void
setDepends
(ClassDescriptor depends) Sets theClassDescriptor
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 theFieldDescriptor
s that describe the fields defined for this class.void
setIdentities
(FieldDescriptor[] identities) Sets theFieldDescriptor
s that describe the identities as defined for this class.void
setJavaClass
(Class<?> javaClass) Sets the JavaClass
as described by this descriptor.void
setMapping
(ClassMapping mapping) Sets theClassMapping
instance.void
setProperty
(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 theClassMapping
instance.- Parameters:
mapping
- TheClassMapping
instance to be used.
-
getMapping
Returns theClassMapping
instance used.- Returns:
- The
ClassMapping
instance used.
-
setJavaClass
-
getJavaClass
Returns the Java class represented by this descriptor.- Specified by:
getJavaClass
in 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:
getExtends
in interfaceClassDescriptor
- Returns:
- The extended class descriptor
- See Also:
-
setDepends
Sets theClassDescriptor
of the class which this class depends upon.- Parameters:
depends
- theClassDescriptor
of the class which this class depends upon
-
getDepends
Returns theClassDescriptor
of the class which this class depends upon.- Returns:
- the
ClassDescriptor
of the class which this class depends upon.
-
setFields
Sets theFieldDescriptor
s that describe the fields defined for this class.- Parameters:
fields
- theFieldDescriptor
s that describe the fields defined for this class.
-
getFields
Returns a list of fields represented by this descriptor.- Specified by:
getFields
in interfaceClassDescriptor
- Returns:
- A list of fields
- See Also:
-
toString
-
getProperty
Description copied from interface:PropertyHolder
Get a property by its name.- Specified by:
getProperty
in interfacePropertyHolder
- Parameters:
name
- of the property- Returns:
- value of the property
-
setProperty
Description copied from interface:PropertyHolder
Set a property specified by the name to the passed value.- Specified by:
setProperty
in interfacePropertyHolder
- Parameters:
name
- of the propertyvalue
- of the property
-
addNature
Description copied from interface:NatureExtendable
Adds a specified nature.- Specified by:
addNature
in interfaceNatureExtendable
- Parameters:
nature
- ID of the Nature
-
hasNature
Description copied from interface:NatureExtendable
Checks if a specified nature has been added.- Specified by:
hasNature
in interfaceNatureExtendable
- Parameters:
nature
- ID of the Nature- Returns:
- true if the Nature ID was added.
-
setIdentities
Sets theFieldDescriptor
s that describe the identities as defined for this class.- Parameters:
identities
- theFieldDescriptor
s that describe the identities as defined for this class.
-
getIdentities
Returns theFieldDescriptor
s that describe the identities as defined for this class.- Returns:
- the
FieldDescriptor
s that describe the identities as defined for this class.
-
getIdentity
Returns the firstFieldDescriptor
instance.- Specified by:
getIdentity
in interfaceClassDescriptor
- Returns:
- the first
FieldDescriptor
instance
-