|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.tools.MappingTool
public class MappingTool
A tool which uses the introspector to automatically create mappings for a given set of classes.
Constructor Summary | |
---|---|
MappingTool()
Constructor, builds up the relations. |
Method Summary | |
---|---|
void |
addClass(java.lang.Class cls)
Adds the given Class to the mapping file. |
void |
addClass(java.lang.Class cls,
boolean deep)
Adds the given Class to the mapping file. |
void |
addClass(java.lang.String name)
Adds the Class, specified by the given name, to the mapping file. |
void |
addClass(java.lang.String name,
boolean deep)
Adds the Class, specified by the given name, to the mapping file. |
static void |
main(java.lang.String[] args)
Command line method. |
void |
setForceIntrospection(boolean force)
Enables or disables the forcing of introspection when a ClassDescriptor already exists. |
void |
setInternalContext(InternalContext internalContext)
To set the XMLContext to be used. |
void |
write(java.io.Writer writer)
Serializes the mapping to the given writer. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MappingTool()
Method Detail |
---|
public static void main(java.lang.String[] args)
args
- the command line parameterspublic void addClass(java.lang.String name) throws MappingException
name
- the name of the Class to add
MappingException
- in case that the name is null or the Class can not be loadedpublic void addClass(java.lang.String name, boolean deep) throws MappingException
name
- the name of the Class to adddeep
- a flag to indicate that recursive processing should take place
and all classes used by the given class should also be added
to the mapping file. This flag is true by default.
MappingException
- in case that the name is null or the Class can not be loadedpublic void addClass(java.lang.Class cls) throws MappingException
cls
- the Class to add
MappingException
- in case that the name is null or the Class can not be loadedpublic void addClass(java.lang.Class cls, boolean deep) throws MappingException
cls
- the Class to adddeep
- a flag to indicate that recursive processing should take place
and all classes used by the given class should also be added
to the mapping file. This flag is true by default.
MappingException
- in case that the name is null or the Class can not be loadedpublic void setForceIntrospection(boolean force)
force
- when true will cause the MappingTool to always use
introspection regardless of whether or not a ClassDescriptor
exists for a given Class.public void write(java.io.Writer writer) throws MappingException
writer
- the Writer to serialize the mapping to
MappingException
- if writing the mapping information failspublic void setInternalContext(InternalContext internalContext)
internalContext
- the XMLContext to be used
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |