|
||||||||||
| 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 List<Class<?>> |
_classes
List of manually added domain Classes. |
protected List<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(Class<?> domainClass)
Adds a given Class instance manually, so that it can be loaded from
the file system. |
void |
addPackage(String packageName)
Adds a given package name manually, so that class descriptors can be loaded from this package (from the file system). |
Iterator<ClassDescriptor> |
descriptorIterator()
Returns an iterator over all the known descriptors in the original order they have been added. |
ClassLoader |
getClassLoader()
Returns the ClassLoader instance as used internally. |
MappingLoader |
getMappingLoader()
|
void |
registerDescriptor(Class<?> type,
ClassDescriptor classDescriptor)
Registers a ClassDescriptor with the descriptor cache. |
ClassDescriptor |
resolve(Class<?> type)
Returns the ClassDescriptor for the given class using the following strategy. |
ClassDescriptor |
resolve(String type)
Returns the ClassDescriptor for the given class. |
void |
setMappingLoader(MappingLoader mappingLoader)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<Class<?>> _classes
Classes.
protected List<String> _packages
| Constructor Detail |
|---|
public JDOClassDescriptorResolverImpl()
| Method Detail |
|---|
public ClassDescriptor resolve(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(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(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(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(String packageName)
addPackage in interface JDOClassDescriptorResolverpackageName - A given package name.public Iterator<ClassDescriptor> descriptorIterator()
ClassDescriptor.
descriptorIterator in interface JDOClassDescriptorResolverIterator over all the known JDO class descriptors.public 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 | |||||||||