org.exolab.castor.xml.util
Class ClassResolutionByCDR

java.lang.Object
  extended by org.exolab.castor.xml.util.BaseResolutionCommand
      extended by org.exolab.castor.xml.util.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

Constructor Summary
ClassResolutionByCDR()
          Constructor.
 
Method Summary
 java.util.Map getDescriptors(java.lang.String packageName)
          Get all descriptors from the package defined by the packageName that contains the JDOConstants.PKG_CDR_LIST_FILE file.
 ClassDescriptor resolve(java.lang.Class type)
          Resolves a type to a ClassDescriptor by looking for a JDOConstants.PKG_CDR_LIST_FILE file in the root directory.
 
Methods inherited from class org.exolab.castor.xml.util.BaseResolutionCommand
addNature, getProperty, hasNature, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassResolutionByCDR

public ClassResolutionByCDR()
Constructor.

Method Detail

resolve

public ClassDescriptor resolve(java.lang.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 java.util.Map getDescriptors(java.lang.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 © 2011. All Rights Reserved.