|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exolab.castor.xml.util.JDOClassDescriptorResolverImpl
public class JDOClassDescriptorResolverImpl
JDO-specific ClassDescriptorResolver
instance that provides
functionality to find or "resolve" ClassDescriptor
s from a given
class (name).
JDOClassDescriptorResolver
Field Summary | |
---|---|
protected java.util.List |
_classes
List of manually added domain Class es. |
protected java.util.List |
_packages
List of manually added package names. |
Constructor Summary | |
---|---|
JDOClassDescriptorResolverImpl()
Creates an instance of this class, with no classed manually added. |
Method Summary | |
---|---|
void |
addClass(java.lang.Class domainClass)
Adds a given Class instance manually, so that it can be loaded from
the file system. |
void |
addPackage(java.lang.String packageName)
Adds a given package name manually, so that class descriptors can be loaded from this package (from the file system). |
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 ClassLoader instance as used internally. |
MappingLoader |
getMappingLoader()
Note: This method will be removed soon (kv). |
ClassDescriptor |
resolve(java.lang.Class type)
Returns the ClassDescriptor for the given class using the following strategy. Lookup the class descriptor cache Call ClassResolutionByMappingLoader command
Call ClassResolutionByFile command
|
ClassDescriptor |
resolve(java.lang.String type)
Returns the ClassDescriptor for the given class. |
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 |
Field Detail |
---|
protected java.util.List _classes
Class
es.
protected java.util.List _packages
Constructor Detail |
---|
public JDOClassDescriptorResolverImpl()
Method Detail |
---|
public ClassDescriptor resolve(java.lang.String type) throws ResolverException
resolve
in interface JDOClassDescriptorResolver
type
- the class name to find the ClassDescriptor for
ResolverException
- Indicates that the given Class
cannot be resolved.JDOClassDescriptorResolver.resolve(java.lang.String)
public ClassDescriptor resolve(java.lang.Class type) throws ResolverException
ClassResolutionByMappingLoader
command
ClassResolutionByFile
command
resolve
in interface ClassDescriptorResolver
type
- the Class to find the ClassDescriptor for
ResolverException
- Indicates that the given Class
cannot be resolved.public MappingLoader getMappingLoader()
getMappingLoader
in interface ClassDescriptorResolver
ClassDescriptorResolver.getMappingLoader()
public void setMappingLoader(MappingLoader mappingLoader)
setMappingLoader
in interface ClassDescriptorResolver
#setMappingLoader(org.exolab.castor.mapping.MappingLoader)
public void addClass(java.lang.Class domainClass)
Class
instance manually, so that it can be loaded from
the file system.
addClass
in interface JDOClassDescriptorResolver
domainClass
- A given Class
instance.JDOClassDescriptorResolver.addClass(java.lang.Class)
public void addPackage(java.lang.String packageName)
addPackage
in interface JDOClassDescriptorResolver
packageName
- A given package name.JDOClassDescriptorResolver.addPackage(java.lang.String)
public java.util.Iterator descriptorIterator()
ClassDescriptor
.
descriptorIterator
in interface JDOClassDescriptorResolver
Iterator
over all the known JDO class descriptors.JDOClassDescriptorResolver.descriptorIterator()
public java.lang.ClassLoader getClassLoader()
ClassLoader
instance as used internally.
getClassLoader
in interface JDOClassDescriptorResolver
ClassLoader
instance used internally.JDOClassDescriptorResolver.getClassLoader()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |