|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.util.XMLClassDescriptorResolverImpl
public class XMLClassDescriptorResolverImpl
The default implementation of the ClassDescriptorResolver interface.
Constructor Summary | |
---|---|
XMLClassDescriptorResolverImpl()
Creates a new ClassDescriptorResolverImpl. |
Method Summary | |
---|---|
void |
addClass(java.lang.String className)
Loads the class descriptor for the class instance 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. |
Introspector |
getIntrospector()
Returns the Introspector being used by this ClassDescriptorResolver. |
MappingLoader |
getMappingLoader()
Note: This method will be removed soon (kv). |
void |
loadClassDescriptors(java.lang.String packageName)
Loads class descriptors from the package specified. |
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 |
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 |
setIntrospection(boolean enable)
Enables or disables introspection. |
void |
setLoadPackageMappings(boolean loadPackageMappings)
Sets whether or not to look for and load package specific mapping files (".castor.xml" files). |
void |
setMappingLoader(MappingLoader mappingLoader)
Sets the mapping loader for this ClassDescriptorResolver Note: This method will be removed soon (kv). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XMLClassDescriptorResolverImpl()
Method Detail |
---|
public Introspector getIntrospector()
public MappingLoader getMappingLoader()
getMappingLoader
in interface ClassDescriptorResolver
ClassDescriptorResolver.getMappingLoader()
public ClassDescriptor resolve(java.lang.Class type) throws ResolverException
resolve
in interface ClassDescriptorResolver
type
- the Class to find the ClassDescriptor for
ResolverException
ClassDescriptorResolver.resolve(java.lang.Class)
public XMLClassDescriptor resolve(java.lang.String className) throws ResolverException
resolve
in interface XMLClassDescriptorResolver
className
- the class name to find the XMLClassDescriptor for
ResolverException
XMLClassDescriptorResolver.resolve(java.lang.String)
public XMLClassDescriptor resolve(java.lang.String className, java.lang.ClassLoader loader) throws ResolverException
resolve
in interface XMLClassDescriptorResolver
className
- the class name to find the XMLClassDescriptor forloader
- the ClassLoader to use
ResolverException
XMLClassDescriptorResolver.resolve(java.lang.String,
java.lang.ClassLoader)
public XMLClassDescriptor resolveByXMLName(java.lang.String xmlName, java.lang.String namespaceURI, java.lang.ClassLoader loader)
resolveByXMLName
in interface XMLClassDescriptorResolver
xmlName
- The class name to find the XMLClassDescriptor for.loader
- The ClassLoader to use.
XMLClassDescriptorResolver.resolveByXMLName(java.lang.String, java.lang.String, java.lang.ClassLoader)
public java.util.Iterator resolveAllByXMLName(java.lang.String xmlName, java.lang.String namespaceURI, java.lang.ClassLoader loader)
resolveAllByXMLName
in interface XMLClassDescriptorResolver
xmlName
- The class name to find the XMLClassDescriptor for.loader
- The ClassLoader to use.
XMLClassDescriptorResolver.resolveAllByXMLName(java.lang.String, java.lang.String, java.lang.ClassLoader)
public void setClassLoader(java.lang.ClassLoader loader)
setClassLoader
in interface XMLClassDescriptorResolver
loader
- the ClassLoader to useXMLClassDescriptorResolver.setClassLoader(java.lang.ClassLoader)
public void setIntrospection(boolean enable)
enable
- a flag to indicate whether or not introspection
is allowed.public void setLoadPackageMappings(boolean loadPackageMappings)
loadPackageMappings
- a boolean that enables or
disables the loading of package specific mapping filespublic void setMappingLoader(MappingLoader mappingLoader)
setMappingLoader
in interface ClassDescriptorResolver
ClassDescriptorResolver.setMappingLoader(org.exolab.castor.mapping.MappingLoader)
public void addClass(java.lang.String className)
addClass
in interface XMLClassDescriptorResolver
className
- Name of the class for which the associated descriptor should be loaded.public void addClasses(java.lang.String[] classNames)
addClasses
in interface XMLClassDescriptorResolver
classNames
- Names of the classes for which the associated descriptors should be loaded.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 XMLClassDescriptorResolver
packageName
- The package name for the (descriptor) classes
ResolverException
- 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 XMLClassDescriptorResolver
packageNames
- The package names for the (descriptor) classes
ResolverException
- 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 XMLClassDescriptorResolver
packageName
- The package name for the (descriptor) classes
ResolverException
- If there's a problem loading class descriptors for the given package.
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |