ClassDescriptorResolver, XMLClassDescriptorResolverpublic class XMLClassDescriptorResolverImpl extends java.lang.Object implements XMLClassDescriptorResolver
| Constructor | Description | 
|---|---|
XMLClassDescriptorResolverImpl() | 
 Creates a new ClassDescriptorResolverImpl. 
 | 
| Modifier and Type | Method | Description | 
|---|---|---|
void | 
addClass(java.lang.Class<?> clazz) | 
 Loads the class descriptor for the class instance specified. 
 | 
void | 
addClass(java.lang.String className) | 
 Loads the class descriptor for the class instance specified. 
 | 
void | 
addClasses(java.lang.Class<?>[] clazzes) | 
 Loads the class descriptors for the class instances specified. 
 | 
void | 
addClasses(java.lang.String[] classNames) | 
 Loads the class descriptors for the class instances specified. 
 | 
void | 
addPackage(java.lang.String packageName) | 
 Loads class descriptors from the package specified. 
 | 
void | 
addPackages(java.lang.String[] packageNames) | 
 Loads class descriptors from the packages specified. 
 | 
void | 
cleanDescriptorCache() | 
 Cleans the descriptor cache. 
 | 
MappingLoader | 
getMappingLoader() | 
 Note: This method will be removed soon (kv). 
 | 
void | 
loadClassDescriptors(java.lang.String packageName) | 
 Deprecated.  
 | 
ClassDescriptor | 
resolve(java.lang.Class<?> type) | 
 Returns the ClassDescriptor for the given class. 
 | 
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. 
 | 
java.util.Iterator<ClassDescriptor> | 
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. 
 | 
void | 
setClassLoader(java.lang.ClassLoader loader) | 
 Sets the ClassLoader to use when loading class descriptors. 
 | 
void | 
setInternalContext(InternalContext internalContext) | 
 To set the XMLContext to be used. 
 | 
void | 
setIntrospector(Introspector introspector) | 
 To set the Introspector to be used. 
 | 
void | 
setLoadPackageMappings(boolean loadPackageMappings) | 
 Sets whether or not to look for and load package specific mapping files
 (".castor.xml"). 
 | 
void | 
setMappingLoader(MappingLoader mappingLoader) | 
 Sets the mapping loader for this ClassDescriptorResolver. 
 | 
void | 
setResolverStrategy(ResolverStrategy resolverStrategy) | 
 The resolver strategy to use for class and package resolving. 
 | 
void | 
setUseIntrospection(boolean enable) | 
 Enables or disables introspection. 
 | 
public XMLClassDescriptorResolverImpl()
public void setInternalContext(InternalContext internalContext)
setInternalContext in interface XMLClassDescriptorResolverinternalContext - the XMLContext to be usedpublic MappingLoader getMappingLoader()
getMappingLoader in interface ClassDescriptorResolverpublic void setClassLoader(java.lang.ClassLoader loader)
setClassLoader in interface XMLClassDescriptorResolverloader - the ClassLoader to usepublic void setUseIntrospection(boolean enable)
setUseIntrospection in interface XMLClassDescriptorResolverenable - a flag to indicate whether or not introspection is allowed.public void setLoadPackageMappings(boolean loadPackageMappings)
setLoadPackageMappings in interface XMLClassDescriptorResolverloadPackageMappings - a boolean that enables or disables the loading of package
            specific mapping filespublic void setMappingLoader(MappingLoader mappingLoader)
setMappingLoader in interface ClassDescriptorResolverpublic void setIntrospector(Introspector introspector)
setIntrospector in interface XMLClassDescriptorResolverintrospector - the Introspector to usepublic void setResolverStrategy(ResolverStrategy resolverStrategy)
setResolverStrategy in interface XMLClassDescriptorResolverresolverStrategy - the ResolverStrategy to use for resolve callspublic ClassDescriptor resolve(java.lang.Class<?> type) throws ResolverException
resolve in interface ClassDescriptorResolvertype - the Class to find the ClassDescriptor forResolverExceptionpublic XMLClassDescriptor resolve(java.lang.String className) throws ResolverException
resolve in interface XMLClassDescriptorResolverclassName - the class name to find the XMLClassDescriptor forResolverException - in case that resolving fails unrecoverablepublic XMLClassDescriptor resolve(java.lang.String className, java.lang.ClassLoader loader) throws ResolverException
resolve in interface XMLClassDescriptorResolverclassName - the class name to find the XMLClassDescriptor forloader - the ClassLoader to useResolverException - in case that resolving fails unrecoverablepublic XMLClassDescriptor resolveByXMLName(java.lang.String xmlName, java.lang.String namespaceURI, java.lang.ClassLoader loader)
resolveByXMLName in interface XMLClassDescriptorResolverxmlName - The class name to find the XMLClassDescriptor for.namespaceURI - The namespace URI to identify the XMLClassDescriptor.loader - The ClassLoader to use.public java.util.Iterator<ClassDescriptor> resolveAllByXMLName(java.lang.String xmlName, java.lang.String namespaceURI, java.lang.ClassLoader loader)
resolveAllByXMLName in interface XMLClassDescriptorResolverxmlName - The class name to find the XMLClassDescriptor for.namespaceURI - The namespace URI to identify the XMLClassDescriptor.loader - The ClassLoader to use.public void addClass(java.lang.String className)
              throws ResolverException
addClass in interface XMLClassDescriptorResolverclassName - Name of the class for which the associated descriptor should
            be loaded.ResolverException - If there's an unrecoverable problem with resolving a certain
             class.public void addClasses(java.lang.String[] classNames)
                throws ResolverException
addClasses in interface XMLClassDescriptorResolverclassNames - Names of the classes for which the associated descriptors
            should be loaded.ResolverException - If there's an unrecoverable problem with resolving a certain
             class.public void addClass(java.lang.Class<?> clazz)
              throws ResolverException
addClass in interface XMLClassDescriptorResolverclazz - Class for which the associated descriptor should be loaded.ResolverException - If there's an unrecoverable problem with resolving a certain
             class.public void addClasses(java.lang.Class<?>[] clazzes)
                throws ResolverException
addClasses in interface XMLClassDescriptorResolverclazzes - Classes for which the associated descriptors should be loaded.ResolverException - If there's an unrecoverable problem with resolving a certain
             class.public void addPackage(java.lang.String packageName)
                throws ResolverException
Please note that this functionality will work only if you provide the .castor.cdr file with your generated classes (as generated by the XML code generator).
addPackage in interface XMLClassDescriptorResolverpackageName - The package name for the (descriptor) classesResolverException - If there's a problem loading class descriptors for the given
             package.public void addPackages(java.lang.String[] packageNames)
                 throws ResolverException
Please note that this functionality will work only if you provide the .castor.cdr files with your generated classes (as generated by the XML code generator).
addPackages in interface XMLClassDescriptorResolverpackageNames - The package names for the (descriptor) classesResolverException - If there's a problem loading class descriptors for the given
             package.public void loadClassDescriptors(java.lang.String packageName)
                          throws ResolverException
Please note that this functionality will work only if you provide the .castor.cdr file with your generated classes (as generated by the XML code generator).
loadClassDescriptors in interface XMLClassDescriptorResolverpackageName - The package name for the (descriptor) classesResolverException - If there's a problem loading class descriptors for the given
             package.public void cleanDescriptorCache()
cleanDescriptorCache in interface XMLClassDescriptorResolverXMLClassDescriptorResolver.cleanDescriptorCache()Intalio Inc. (C) 1999-2008. All rights reserved http://www.intalio.com