Package org.castor.cpa.util
Interface JDOClassDescriptorResolver
-
- All Superinterfaces:
ClassDescriptorResolver
- All Known Implementing Classes:
JDOClassDescriptorResolverImpl
public interface JDOClassDescriptorResolver extends ClassDescriptorResolver
JDO-specificClassDescriptorResolverinstance that provides functionality to find or "resolve"ClassDescriptors from a given class (name).- Since:
- 1.2.1
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddClass(java.lang.Class<?> domainClass)Adds a givenClassinstance manually, so that it can be loaded from the file system.voidaddPackage(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.ClassLoadergetClassLoader()Returns theClassLoaderinstance as used internally.voidregisterDescriptor(java.lang.Class<?> type, ClassDescriptor classDescriptor)Registers aClassDescriptorwith the descriptor cache.ClassDescriptorresolve(java.lang.String type)Returns the ClassDescriptor for the given class.-
Methods inherited from interface org.exolab.castor.xml.ClassDescriptorResolver
getMappingLoader, resolve, setMappingLoader
-
-
-
-
Method Detail
-
resolve
ClassDescriptor resolve(java.lang.String type) throws ResolverException
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 givenClasscannot be resolved.
-
addClass
void addClass(java.lang.Class<?> domainClass)
Adds a givenClassinstance manually, so that it can be loaded from the file system.- Parameters:
domainClass- A givenClassinstance.
-
addPackage
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).- Parameters:
packageName- A given package name.
-
descriptorIterator
java.util.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
Iteratorover all the known JDO class descriptors.
-
getClassLoader
java.lang.ClassLoader getClassLoader()
Returns theClassLoaderinstance as used internally.- Returns:
- The
ClassLoaderinstance used internally.
-
registerDescriptor
void registerDescriptor(java.lang.Class<?> type, ClassDescriptor classDescriptor)Registers aClassDescriptorwith the descriptor cache.- Parameters:
type- Type of the class described by theClassDescriptorto register.classDescriptor- TheClassDescriptorto register with the cache.
-
-