public abstract class AbstractMappingLoader2 extends java.lang.Object implements MappingLoader
| Constructor and Description |
|---|
AbstractMappingLoader2(java.lang.ClassLoader loader) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addDescriptor(ClassDescriptor descriptor)
Adds a class descriptor.
|
void |
clear() |
java.util.Iterator |
descriptorIterator()
Returns an iterator over all the known descriptors in the original order they have been
added.
|
java.lang.ClassLoader |
getClassLoader()
Returns the class loader associated with this mapping loader if one was specified.
|
ClassDescriptor |
getDescriptor(java.lang.String classname)
Returns the ClassDescriptor for the class with the given name.
|
boolean |
isAllowRedefinition()
Is the ability to allow redefinitions enabled or disabled?
|
void |
loadMapping(MappingRoot mapping,
java.lang.Object param)
Loads the mapping from the specified mapping object if not loaded previously.
|
protected abstract void |
loadMappingInternal(MappingRoot mapping,
java.lang.Object param)
Loads the mapping from the specified mapping object.
|
void |
setAllowRedefinitions(boolean allow)
Enables or disables the ability to allow the redefinition of class mappings.
|
void |
setClassLoader(java.lang.ClassLoader loader) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetBindingType, getSourceTypepublic AbstractMappingLoader2(java.lang.ClassLoader loader)
public final void clear()
clear in interface MappingLoaderpublic final void setClassLoader(java.lang.ClassLoader loader)
setClassLoader in interface MappingLoader{@inheritDoc}public final java.lang.ClassLoader getClassLoader()
MappingLoadergetClassLoader in interface MappingLoader{@inheritDoc}public final void setAllowRedefinitions(boolean allow)
allow - A boolean that when true enables redefinitions.public final boolean isAllowRedefinition()
protected final void addDescriptor(ClassDescriptor descriptor) throws MappingException
descriptor - The descriptor to add.MappingException - A descriptor for this class already exists.public final ClassDescriptor getDescriptor(java.lang.String classname)
MappingLoadergetDescriptor in interface MappingLoaderclassname - The className for which to return the associated ClassDescriptor.{@inheritDoc}public final java.util.Iterator descriptorIterator()
MappingLoaderClassDescriptor.descriptorIterator in interface MappingLoader{@inheritDoc}public final void loadMapping(MappingRoot mapping, java.lang.Object param) throws MappingException
mapping - The mapping information.param - Arbitrary parameter that can be used by subclasses.MappingException - The mapping file is invalid.protected abstract void loadMappingInternal(MappingRoot mapping, java.lang.Object param) throws MappingException
#createDescriptor to
create each descriptor and addDescriptor(org.exolab.castor.mapping.ClassDescriptor) to store it. Also loads all the included
mapping files.mapping - The mapping information.param - Arbitrary parameter that can be used by subclasses.MappingException - The mapping file is invalid.Intalio Inc. (C) 1999-2006. All rights reserved http://www.intalio.com