org.exolab.castor.xml.descriptors
Class DateClassDescriptor
java.lang.Object
org.exolab.castor.xml.descriptors.DateClassDescriptor
- ClassDescriptor, XMLClassDescriptor
public class DateClassDescriptor
extends java.lang.Object
A ClassDescriptor for java.util.Date
$Revision: 1.1.1.1 $ $Date: 2003/03/03 07:09:17 $
DateClassDescriptor
public DateClassDescriptor()
canAccept
public boolean canAccept(String fieldName,
Object object)
Returns true if the given object represented by this XMLClassDescriptor
can accept a member whose name is given.
An XMLClassDescriptor can accept a field if it contains a descriptor that matches
the given name and if the given object can hold this field (i.e a value is not already set for
this field).
This is mainly used for container object (that can contains other object), in this particular case
the implementation will return null.
- canAccept in interface XMLClassDescriptor
fieldName
- the name of the field to checkobject
- the object represented by this XMLCLassDescriptor
- true if the given object represented by this XMLClassDescriptor
can accept a member whose name is given.
getAttributeDescriptors
public XMLFieldDescriptor[] getAttributeDescriptors()
Returns the set of XMLFieldDescriptors for all members
that should be marshalled as XML attributes.
- getAttributeDescriptors in interface XMLClassDescriptor
- an array of XMLFieldDescriptors for all members
that should be marshalled as XML attributes.
getContentDescriptor
public XMLFieldDescriptor getContentDescriptor()
Returns the XMLFieldDescriptor for the member
that should be marshalled as text content.
- getContentDescriptor in interface XMLClassDescriptor
- the XMLFieldDescriptor for the member
that should be marshalled as text content.
getElementDescriptors
public XMLFieldDescriptor[] getElementDescriptors()
Returns the set of XMLFieldDescriptors for all members
that should be marshalled as XML elements.
- getElementDescriptors in interface XMLClassDescriptor
- an array of XMLFieldDescriptors for all members
that should be marshalled as XML elements.
getFieldDescriptor
public XMLFieldDescriptor getFieldDescriptor(String name,
NodeType nodeType)
Returns the XML field descriptor matching the given
xml name and nodeType. If NodeType is null, then
either an AttributeDescriptor, or ElementDescriptor
may be returned. Null is returned if no matching
descriptor is available.
- getFieldDescriptor in interface XMLClassDescriptor
name
- the xml name to match against
- the matching descriptor, or null if no matching
descriptor is available.
getJavaClass
public Class getJavaClass()
Returns the Java class represented by this descriptor.
- getJavaClass in interface ClassDescriptor
getValidator
public TypeValidator getValidator()
Returns a specific validator for the class described by
this ClassDescriptor. A null value may be returned
if no specific validator exists.
- getValidator in interface XMLClassDescriptor
- the type validator for the class described by this
ClassDescriptor.
toString
public String toString()
Returns the String representation of this XMLClassDescriptor
- the String representation of this XMLClassDescriptor
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com