|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.Introspector
A Helper class for the Marshaller and Unmarshaller, basically the common code base between the two. This class handles the introspection to dynamically create descriptors.
Nested Class Summary | |
(package private) class |
Introspector.MethodSet
A simple struct for holding a set of accessor methods |
Constructor Summary | |
Introspector()
|
Method Summary | |
XMLClassDescriptor |
generateClassDescriptor(java.lang.Class c)
Creates an XMLClassDescriptor for the given class by using Reflection. |
XMLClassDescriptor |
generateClassDescriptor(java.lang.Class c,
java.io.PrintWriter errorWriter)
Creates an XMLClassDescriptor for the given class by using Reflection. |
NodeType |
getPrimitiveNodeType()
Returns the NodeType for java primitives |
static boolean |
introspected(XMLClassDescriptor descriptor)
Returns true if the given XMLClassDescriptor was created via introspection |
static boolean |
marshallable(java.lang.Class type)
Returns true if the given Class can be marshalled. |
void |
setNaming(XMLNaming naming)
Sets the Naming conventions to be used by the Introspector |
void |
setPrimitiveNodeType(NodeType nodeType)
Sets the NodeType for primitives. |
static java.lang.String |
toJavaName(java.lang.String name,
boolean upperFirst)
Converts the given xml name to a Java name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public Introspector()
Method Detail |
public NodeType getPrimitiveNodeType()
public XMLClassDescriptor generateClassDescriptor(java.lang.Class c) throws MarshalException
c
- the Class to create the XMLClassDescriptor for
MarshalException
- when an error occurs during the creation
of the ClassDescriptor.public XMLClassDescriptor generateClassDescriptor(java.lang.Class c, java.io.PrintWriter errorWriter) throws MarshalException
c
- the Class to create the XMLClassDescriptor forerrorWriter
- a PrintWriter to print error information to
MarshalException
- when an error occurs during the creation
of the ClassDescriptor.public static boolean introspected(XMLClassDescriptor descriptor)
public static boolean marshallable(java.lang.Class type)
type
- the Class to check marshallability for.
public void setNaming(XMLNaming naming)
naming
- the implementation of Naming to use. A
value of null, will reset the XMLNaming to the
default specified in the castor.properties file.public void setPrimitiveNodeType(NodeType nodeType)
nodeType
- the NodeType to use for primitive values.public static java.lang.String toJavaName(java.lang.String name, boolean upperFirst)
name
- the name to convert to a Java NameupperFirst
- a flag to indicate whether or not the
the first character should be converted to uppercase.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |