org.exolab.castor.xml.util
Class ClassDescriptorResolverImpl
java.lang.Object
org.exolab.castor.xml.util.ClassDescriptorResolverImpl
- ClassDescriptorResolver
public class ClassDescriptorResolverImpl
extends java.lang.Object
The default implementation of the ClassDescriptorResolver interface
$Revision: 1.2 $ $Date: 2003/03/19 08:13:28 $
ClassDescriptorResolverImpl
public ClassDescriptorResolverImpl()
Creates a new ClassDescriptorResolverImpl
ClassDescriptorResolverImpl
public ClassDescriptorResolverImpl(ClassLoader loader)
Creates a new ClassDescriptorResolverImpl with the given ClassLoader
loader
- the ClassLoader to use when loading ClassDescriptors
associate
public void associate(Class type,
XMLClassDescriptor classDesc)
Associates (or binds) a class type with a given ClassDescriptor
type
- the Class to associate with the given descriptorclassDesc
- the ClassDescriptor to associate the given
class with
error
public boolean error()
Returns true if an error was generated on the last call
to one of the resolve methods
- error in interface ClassDescriptorResolver
- true if an error was generated on the last call
to one of the resolve methods
getErrorMessage
public String getErrorMessage()
Returns the last error message generated
If no error String exists, null will be returned
- getErrorMessage in interface ClassDescriptorResolver
- the last error message generated.
If no error String exists, null will be returned
getIntrospector
public Introspector getIntrospector()
Returns the Introspector being used by this ClassDescriptorResolver.
This allows for configuration of the Introspector.
- the Introspector being used by this ClassDescriptorResolver
resolve
public XMLClassDescriptor resolve(Class type)
Returns the XMLClassDescriptor for the given class
- resolve in interface ClassDescriptorResolver
type
- the Class to find the XMLClassDescriptor for
- the XMLClassDescriptor for the given class
resolve
public XMLClassDescriptor resolve(String className)
Returns the XMLClassDescriptor for the given class name
- resolve in interface ClassDescriptorResolver
className
- the class name to find the XMLClassDescriptor for
- the XMLClassDescriptor for the given class name
resolve
public XMLClassDescriptor resolve(String className,
ClassLoader loader)
Returns the XMLClassDescriptor for the given class name
- resolve in interface ClassDescriptorResolver
className
- the class name to find the XMLClassDescriptor forloader
- the ClassLoader to use
- the XMLClassDescriptor for the given class name
resolveAllByXMLName
public ClassDescriptorEnumeration resolveAllByXMLName(String xmlName,
String namespaceURI,
ClassLoader loader)
Returns an enumeration of XMLClassDescriptor objects that
match the given xml name
- resolveAllByXMLName in interface ClassDescriptorResolver
loader
- the ClassLoader to use
- an enumeration of XMLClassDescriptor objects.
resolveByXMLName
public XMLClassDescriptor resolveByXMLName(String xmlName,
String namespaceURI,
ClassLoader loader)
Returns the first XMLClassDescriptor that matches the given
XML name and namespaceURI. Null is returned if no descriptor
can be found.
- resolveByXMLName in interface ClassDescriptorResolver
loader
- the ClassLoader to use
- the XMLClassDescriptor for the given XML name
setClassLoader
public void setClassLoader(ClassLoader loader)
Sets the ClassLoader to use when loading class descriptors
loader
- the ClassLoader to use
setIntrospection
public void setIntrospection(boolean enable)
Enables or disables introspection. Introspection is
enabled by default.
enable
- a flag to indicate whether or not introspection
is allowed.
Intalio Inc. (C) 1999-2003. All rights reserved http://www.intalio.com