org.exolab.castor.tools

Class MappingTool


public class MappingTool
extends java.lang.Object

A tool which uses the introspector to automatically create mappings for a given set of classes.
Version:
$Revision: 1.2 $ $Date: 2003/03/03 09:57:17 $
Authors:
Assaf Arkin
Keith Visco

Nested Class Summary

(package private) class
MappingTool.InternalLoader

Constructor Summary

MappingTool()

Method Summary

void
addClass(Class cls)
Adds the given Class to the mapping file
void
addClass(Class cls, boolean deep)
Adds the given Class to the mapping file.
void
addClass(String name)
Adds the Class, specified by the given name, to the mapping file
void
addClass(String name, boolean deep)
Adds the Class, specified by the given name, to the mapping file
static void
main(String[] args)
Command line method
void
setForceIntrospection(boolean force)
Enables or disables the forcing of introspection when a ClassDescriptor already exists.
void
write(Writer writer)
Serializes the mapping to the given writer

Constructor Details

MappingTool

public MappingTool()

Method Details

addClass

public void addClass(Class cls)
            throws MappingException
Adds the given Class to the mapping file
Parameters:
cls - the Class to add

addClass

public void 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.
Parameters:
cls - the Class to add

addClass

public void addClass(String name)
            throws MappingException
Adds the Class, specified by the given name, to the mapping file
Parameters:
name - the name of the Class to add

addClass

public void addClass(String name,
                     boolean deep)
            throws MappingException
Adds the Class, specified by the given name, to the mapping file
Parameters:
name - the name of the Class to add

main

public static void main(String[] args)
Command line method

setForceIntrospection

public void setForceIntrospection(boolean force)
Enables or disables the forcing of introspection when a ClassDescriptor already exists. This is false by default.
Parameters:
force - when true will cause the MappingTool to always use introspection regardless of whether or not a ClassDescriptor exists for a given Class.

write

public void write(Writer writer)
            throws MappingException
Serializes the mapping to the given writer
Parameters:

Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com