org.castor.cpa.util.classresolution.command
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 a ClassDescriptor from a package that
contains a JDOConstants.PKG_CDR_LIST_FILE file. This file defines the
mapping between a domain class and its corresponding
ClassDescriptor.
- Version:
- 1.2.1
- Author:
- Sebastian Gabmeyer
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ClassResolutionByCDR
public ClassResolutionByCDR()
- Constructor.
resolve
public ClassDescriptor resolve(Class type)
- Resolves a
type to a ClassDescriptor by looking for
a JDOConstants.PKG_CDR_LIST_FILE file in the root directory.
- Parameters:
type - the class to obtain the
ClassDescriptor for.
- Returns:
- the
ClassDescriptor if found, null
otherwise.
getDescriptors
public Map<String,ClassDescriptor> getDescriptors(String packageName)
- Get all descriptors from the package defined by the
packageName that contains the
JDOConstants.PKG_CDR_LIST_FILE file.
- Parameters:
packageName - the package to search descriptors for.
- Returns:
- a
List of descriptors contained in the package.
Copyright © 2010. All Rights Reserved.