Package org.castor.cpa.util
Interface JDOClassDescriptorResolver
- All Superinterfaces:
ClassDescriptorResolver
- All Known Implementing Classes:
JDOClassDescriptorResolverImpl
JDO-specific
ClassDescriptorResolver
instance that provides functionality
to find or "resolve" ClassDescriptor
s from a given class (name).- Since:
- 1.2.1
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds a givenClass
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).Returns an iterator over all the known descriptors in the original order they have been added.Returns theClassLoader
instance as used internally.void
registerDescriptor
(Class<?> type, ClassDescriptor classDescriptor) Registers aClassDescriptor
with the descriptor cache.Returns the ClassDescriptor for the given class.Methods inherited from interface org.exolab.castor.xml.ClassDescriptorResolver
getMappingLoader, resolve, setMappingLoader
-
Method Details
-
resolve
Returns the ClassDescriptor for the given class.- Parameters:
type
- the class name to find the ClassDescriptor for- Returns:
- the ClassDescriptor for the given class
- Throws:
ResolverException
- Indicates that the givenClass
cannot be resolved.
-
addClass
Adds a givenClass
instance manually, so that it can be loaded from the file system.- Parameters:
domainClass
- A givenClass
instance.
-
addPackage
Adds a given package name manually, so that class descriptors can be loaded from this package (from the file system).- Parameters:
packageName
- A given package name.
-
descriptorIterator
Iterator<ClassDescriptor> descriptorIterator()Returns an iterator over all the known descriptors in the original order they have been added. Each element is of typeClassDescriptor
.- Returns:
- an
Iterator
over all the known JDO class descriptors.
-
getClassLoader
ClassLoader getClassLoader()Returns theClassLoader
instance as used internally.- Returns:
- The
ClassLoader
instance used internally.
-
registerDescriptor
Registers aClassDescriptor
with the descriptor cache.- Parameters:
type
- Type of the class described by theClassDescriptor
to register.classDescriptor
- TheClassDescriptor
to register with the cache.
-