Class ClassResolutionByCDR
- java.lang.Object
-
- org.castor.cpa.util.classresolution.command.BaseResolutionCommand
-
- org.castor.cpa.util.classresolution.command.ClassResolutionByCDR
-
- All Implemented Interfaces:
NatureExtendable
,PropertyHolder
,ClassDescriptorResolutionCommand
public class ClassResolutionByCDR extends BaseResolutionCommand
This class tries to resolve aClassDescriptor
from a package that contains aJDOConstants.PKG_CDR_LIST_FILE
file. This file defines the mapping between a domain class and its correspondingClassDescriptor
.- Version:
- 1.2.1
- Author:
- Sebastian Gabmeyer
-
-
Constructor Summary
Constructors Constructor Description ClassResolutionByCDR()
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Map<java.lang.String,ClassDescriptor>
getDescriptors(java.lang.String packageName)
Get all descriptors from the package defined by thepackageName
that contains theJDOConstants.PKG_CDR_LIST_FILE
file.ClassDescriptor
resolve(java.lang.Class type)
Resolves atype
to aClassDescriptor
by looking for aJDOConstants.PKG_CDR_LIST_FILE
file in the root directory.-
Methods inherited from class org.castor.cpa.util.classresolution.command.BaseResolutionCommand
addNature, getClassDescriptorResolver, getProperty, hasNature, setClassDescriptorResolver, setProperty
-
-
-
-
Method Detail
-
resolve
public ClassDescriptor resolve(java.lang.Class type)
Resolves atype
to aClassDescriptor
by looking for aJDOConstants.PKG_CDR_LIST_FILE
file in the root directory.- Parameters:
type
- theclass
to obtain theClassDescriptor
for.- Returns:
- the
ClassDescriptor
if found,null
otherwise.
-
getDescriptors
public java.util.Map<java.lang.String,ClassDescriptor> getDescriptors(java.lang.String packageName)
Get all descriptors from the package defined by thepackageName
that contains theJDOConstants.PKG_CDR_LIST_FILE
file.- Parameters:
packageName
- the package to search descriptors for.- Returns:
- a
List
of descriptors contained in the package.
-
-