Classes | |
class | InternalLoader |
Public Member Functions | |
MappingTool () | |
void | addClass (String name) throws MappingException |
void | addClass (String name, boolean deep) throws MappingException |
void | addClass (Class cls) throws MappingException |
void | addClass (Class cls, boolean deep) throws MappingException |
void | setForceIntrospection (boolean force) |
void | write (Writer writer) throws MappingException |
Static Public Member Functions | |
static void | main (String[] args) |
A tool which uses the introspector to automatically create mappings for a given set of classes.
org.exolab.castor.tools.MappingTool.MappingTool | ( | ) |
Referenced by org.exolab.castor.tools.MappingTool.main().
void org.exolab.castor.tools.MappingTool.addClass | ( | String | name | ) | throws MappingException |
Adds the Class, specified by the given name, to the mapping file
name | the name of the Class to add |
Referenced by org.exolab.castor.tools.MappingTool.addClass(), and org.exolab.castor.tools.MappingTool.main().
void org.exolab.castor.tools.MappingTool.addClass | ( | Class | cls | ) | throws MappingException |
Adds the given Class to the mapping file
cls | the Class to add |
References org.exolab.castor.tools.MappingTool.addClass().
void org.exolab.castor.tools.MappingTool.addClass | ( | Class | cls, | |
boolean | deep | |||
) | throws MappingException |
Adds the given Class to the mapping file. If the deep flag is true, all mappings for Classes used by the given Class will also be added to the mapping file.
cls | the Class to add | |
deep,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. |
References org.exolab.castor.tools.MappingTool.addClass(), org.exolab.castor.mapping.xml.ClassMapping.addFieldMapping(), org.exolab.castor.tools.MappingTool.InternalLoader.canFindAccessors(), org.exolab.castor.xml.Introspector.generateClassDescriptor(), org.exolab.castor.mapping.xml.FieldMapping.getBindXml(), org.exolab.castor.mapping.FieldDescriptor.getClassDescriptor(), org.exolab.castor.mapping.FieldDescriptor.getFieldName(), org.exolab.castor.mapping.ClassDescriptor.getFields(), org.exolab.castor.mapping.FieldDescriptor.getFieldType(), org.exolab.castor.xml.Introspector.introspected(), org.exolab.castor.mapping.FieldDescriptor.isMultivalued(), org.exolab.castor.mapping.FieldDescriptor.isRequired(), org.exolab.castor.mapping.FieldDescriptor.isTransient(), org.exolab.castor.xml.util.ClassDescriptorResolverImpl.resolve(), org.exolab.castor.tools.MappingTool.InternalLoader.returnsArray(), org.exolab.castor.mapping.xml.ClassMapping.setAccess(), org.exolab.castor.mapping.xml.FieldMapping.setBindXml(), org.exolab.castor.mapping.xml.FieldMapping.setCollection(), org.exolab.castor.mapping.xml.FieldMapping.setContainer(), org.exolab.castor.mapping.xml.ClassMapping.setDescription(), org.exolab.castor.mapping.xml.ClassMapping.setMapTo(), org.exolab.castor.mapping.xml.BindXml.setName(), org.exolab.castor.mapping.xml.FieldMapping.setName(), org.exolab.castor.mapping.xml.ClassMapping.setName(), org.exolab.castor.mapping.xml.BindXml.setNode(), org.exolab.castor.mapping.xml.MapTo.setNsPrefix(), org.exolab.castor.mapping.xml.MapTo.setNsUri(), org.exolab.castor.mapping.xml.FieldMapping.setRequired(), org.exolab.castor.mapping.xml.FieldMapping.setTransient(), org.exolab.castor.mapping.xml.FieldMapping.setType(), and org.exolab.castor.mapping.xml.MapTo.setXml().
void org.exolab.castor.tools.MappingTool.addClass | ( | String | name, | |
boolean | deep | |||
) | throws MappingException |
Adds the Class, specified by the given name, to the mapping file
name | the name of the Class to add | |
deep,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. |
References org.exolab.castor.tools.MappingTool.addClass().
static void org.exolab.castor.tools.MappingTool.main | ( | String[] | args | ) | [static] |
Command line method
References org.exolab.castor.tools.MappingTool.addClass(), org.exolab.castor.util.CommandLineOptions.addFlag(), org.exolab.castor.builder.util.ConsoleDialog.confirm(), org.exolab.castor.util.CommandLineOptions.getOptions(), org.exolab.castor.tools.MappingTool.MappingTool(), org.exolab.castor.util.CommandLineOptions.printHelp(), org.exolab.castor.util.CommandLineOptions.printUsage(), and org.exolab.castor.tools.MappingTool.write().
void org.exolab.castor.tools.MappingTool.setForceIntrospection | ( | boolean | force | ) |
Enables or disables the forcing of introspection when a ClassDescriptor already exists. This is false by default.
force | when true will cause the MappingTool to always use introspection regardless of whether or not a ClassDescriptor exists for a given Class. |
void org.exolab.castor.tools.MappingTool.write | ( | Writer | writer | ) | throws MappingException |
Serializes the mapping to the given writer
writer,the | Writer to serialize the mapping to |
References org.exolab.castor.mapping.xml.MappingRoot.addClassMapping(), org.exolab.castor.xml.Marshaller.marshal(), org.exolab.castor.mapping.xml.MappingRoot.setDescription(), and org.exolab.castor.xml.Marshaller.setNamespaceMapping().
Referenced by org.exolab.castor.tools.MappingTool.main().