org.exolab.castor.mapping.loader

Class AbstractMappingLoader2

public abstract class AbstractMappingLoader2 extends Object implements MappingLoader

Constructor Summary
AbstractMappingLoader2(ClassLoader loader)
Method Summary
protected voidaddDescriptor(ClassDescriptor descriptor)
Adds a class descriptor.
voidclear()
IteratordescriptorIterator()
ClassLoadergetClassLoader()
ClassDescriptorgetDescriptor(String classname)
booleanisAllowRedefinition()
Is the ability to allow redefinitions enabled or disabled?
voidloadMapping(MappingRoot mapping, Object param)
Loads the mapping from the specified mapping object if not loaded previously.
protected abstract voidloadMappingInternal(MappingRoot mapping, Object param)
Loads the mapping from the specified mapping object.
voidsetAllowRedefinitions(boolean allow)
Enables or disables the ability to allow the redefinition of class mappings.
voidsetClassLoader(ClassLoader loader)

Constructor Detail

AbstractMappingLoader2

public AbstractMappingLoader2(ClassLoader loader)

Method Detail

addDescriptor

protected final void addDescriptor(ClassDescriptor descriptor)
Adds a class descriptor. Will throw a mapping exception if a descriptor for this class already exists.

Parameters: descriptor The descriptor to add.

Throws: MappingException A descriptor for this class already exists.

clear

public final void clear()

descriptorIterator

public final Iterator descriptorIterator()

See Also: {@inheritDoc }

getClassLoader

public final ClassLoader getClassLoader()

See Also: {@inheritDoc }

getDescriptor

public final ClassDescriptor getDescriptor(String classname)

See Also: {@inheritDoc }

isAllowRedefinition

public final boolean isAllowRedefinition()
Is the ability to allow redefinitions enabled or disabled?

Returns: A boolean that when true enables redefinitions.

loadMapping

public final void loadMapping(MappingRoot mapping, Object param)
Loads the mapping from the specified mapping object if not loaded previously.

Parameters: mapping The mapping information. param Arbitrary parameter that can be used by subclasses.

Throws: MappingException The mapping file is invalid.

loadMappingInternal

protected abstract void loadMappingInternal(MappingRoot mapping, Object param)
Loads the mapping from the specified mapping object. Calls AbstractMappingLoader2 to create each descriptor and AbstractMappingLoader2 to store it. Also loads all the included mapping files.

Parameters: mapping The mapping information. param Arbitrary parameter that can be used by subclasses.

Throws: MappingException The mapping file is invalid.

setAllowRedefinitions

public final void setAllowRedefinitions(boolean allow)
Enables or disables the ability to allow the redefinition of class mappings.

Parameters: allow A boolean that when true enables redefinitions.

setClassLoader

public final void setClassLoader(ClassLoader loader)

See Also: {@inheritDoc }

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