org.exolab.castor.xml
Interface XMLClassDescriptorResolver

All Superinterfaces:
ClassDescriptorResolver
All Known Implementing Classes:
XMLClassDescriptorResolverImpl

public interface XMLClassDescriptorResolver
extends ClassDescriptorResolver

An interface for finding or "resolving" XMLClassDescriptor classes.
Note: This interface is used by the marshalling Framework for resolving XMLClassDescriptors for non-primitive types. There are no guarantees that this class will be called for java native classes.

Version:
$Revision: 5951 $ $Date: 2005-02-28 17:41:38 -0700 (Mon, 28 Feb 2005) $
Author:
Keith Visco

Method Summary
 void loadClassDescriptors(java.lang.String packageName)
          Loads class descriptors from the package specified.
 XMLClassDescriptor resolve(java.lang.String className)
          Returns the XMLClassDescriptor for the given class name
 XMLClassDescriptor resolve(java.lang.String className, java.lang.ClassLoader loader)
          Returns the XMLClassDescriptor for the given class name
 ClassDescriptorEnumeration resolveAllByXMLName(java.lang.String xmlName, java.lang.String namespaceURI, java.lang.ClassLoader loader)
          Returns an enumeration of XMLClassDescriptor objects that match the given xml name.
 XMLClassDescriptor resolveByXMLName(java.lang.String xmlName, java.lang.String namespaceURI, java.lang.ClassLoader loader)
          Returns the first XMLClassDescriptor that matches the given XML name and namespaceURI.
 XMLClassDescriptor resolveXML(java.lang.Class type)
          Returns the XMLClassDescriptor for the given class
 void setClassLoader(java.lang.ClassLoader loader)
          Sets the ClassLoader to use when loading class descriptors
 
Methods inherited from interface org.exolab.castor.xml.ClassDescriptorResolver
getMappingLoader, resolve, setMappingLoader
 

Method Detail

resolveXML

public XMLClassDescriptor resolveXML(java.lang.Class type)
                              throws ResolverException
Returns the XMLClassDescriptor for the given class

Parameters:
type - the Class to find the XMLClassDescriptor for
Returns:
the XMLClassDescriptor for the given class
Throws:
ResolverException

resolve

public XMLClassDescriptor resolve(java.lang.String className)
                           throws ResolverException
Returns the XMLClassDescriptor for the given class name

Parameters:
className - the class name to find the XMLClassDescriptor for
Returns:
the XMLClassDescriptor for the given class name
Throws:
ResolverException

resolve

public XMLClassDescriptor resolve(java.lang.String className,
                                  java.lang.ClassLoader loader)
                           throws ResolverException
Returns the XMLClassDescriptor for the given class name

Parameters:
className - the class name to find the XMLClassDescriptor for
loader - the ClassLoader to use
Returns:
the XMLClassDescriptor for the given class name
Throws:
ResolverException

resolveByXMLName

public XMLClassDescriptor resolveByXMLName(java.lang.String xmlName,
                                           java.lang.String namespaceURI,
                                           java.lang.ClassLoader loader)
                                    throws ResolverException
Returns the first XMLClassDescriptor that matches the given XML name and namespaceURI. Null is returned if no descriptor can be found.

Parameters:
xmlName - The class name to find the XMLClassDescriptor for.
loader - The ClassLoader to use.
Returns:
The XMLClassDescriptor for the given XML name.
Throws:
ResolverException

resolveAllByXMLName

public ClassDescriptorEnumeration resolveAllByXMLName(java.lang.String xmlName,
                                                      java.lang.String namespaceURI,
                                                      java.lang.ClassLoader loader)
                                               throws ResolverException
Returns an enumeration of XMLClassDescriptor objects that match the given xml name.

Parameters:
xmlName - The class name to find the XMLClassDescriptor for.
loader - The ClassLoader to use.
Returns:
An enumeration of XMLClassDescriptor objects.
Throws:
ResolverException

setClassLoader

public void setClassLoader(java.lang.ClassLoader loader)
Sets the ClassLoader to use when loading class descriptors

Parameters:
loader - the ClassLoader to use

loadClassDescriptors

public void loadClassDescriptors(java.lang.String packageName)
                          throws ResolverException
Loads class descriptors from the package specified. The use of this method is useful when no mapping is used, as happens when the domain classes hase been generated using the XML code generator (in which case instead of a mpping file class descriptor files will be generated).

Parameters:
packageName - The package name for the (descriptor) classes
Throws:
ResolverException - If there's a problem loading class descriptors for the given package.


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