|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectorg.castor.cpa.util.JDOClassDescriptorResolverImpl
public class JDOClassDescriptorResolverImpl
JDO-specific ClassDescriptorResolver instance that provides
functionality to find or "resolve" ClassDescriptors from a given
class (name).
JDOClassDescriptorResolver| Field Summary | |
|---|---|
protected java.util.List<java.lang.Class<?>> |
_classes
List of manually added domain Classes. |
protected java.util.List<java.lang.String> |
_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<ClassDescriptor> |
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). |
void |
registerDescriptor(java.lang.Class type,
ClassDescriptor classDescriptor)
Registers a ClassDescriptor with the descriptor cache. |
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<java.lang.Class<?>> _classes
Classes.
protected java.util.List<java.lang.String> _packages
| Constructor Detail |
|---|
public JDOClassDescriptorResolverImpl()
| Method Detail |
|---|
public ClassDescriptor resolve(java.lang.String type)
throws ResolverException
resolve in interface JDOClassDescriptorResolvertype - the class name to find the ClassDescriptor for
ResolverException - Indicates that the given Class
cannot be resolved.
public ClassDescriptor resolve(java.lang.Class type)
throws ResolverException
ClassResolutionByMappingLoader command
ClassResolutionByFile command
resolve in interface ClassDescriptorResolvertype - the Class to find the ClassDescriptor for
ResolverException - Indicates that the given Class cannot be resolved.
public void registerDescriptor(java.lang.Class type,
ClassDescriptor classDescriptor)
ClassDescriptor with the descriptor cache.
registerDescriptor in interface JDOClassDescriptorResolvertype - Type of the class described by the ClassDescriptor to register.classDescriptor - The ClassDescriptor to register with the cache.public MappingLoader getMappingLoader()
getMappingLoader in interface ClassDescriptorResolverpublic void setMappingLoader(MappingLoader mappingLoader)
setMappingLoader in interface ClassDescriptorResolverpublic void addClass(java.lang.Class domainClass)
Class instance manually, so that it can be loaded from
the file system.
addClass in interface JDOClassDescriptorResolverdomainClass - A given Class instance.public void addPackage(java.lang.String packageName)
addPackage in interface JDOClassDescriptorResolverpackageName - A given package name.public java.util.Iterator<ClassDescriptor> descriptorIterator()
ClassDescriptor.
descriptorIterator in interface JDOClassDescriptorResolverIterator over all the known JDO class descriptors.public java.lang.ClassLoader getClassLoader()
ClassLoader instance as used internally.
getClassLoader in interface JDOClassDescriptorResolverClassLoader instance used internally.
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||