SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

com.solarmetric.kodo.runtime
Class JDOClassResolver

java.lang.Object
  |
  +--com.solarmetric.kodo.runtime.JDOClassResolver
All Implemented Interfaces:
ClassResolver

public class JDOClassResolver
extends Object
implements ClassResolver

An imeplementation of ClassResolver that behaves in strict accordance to section 12.5 of the JDO specification:

JDO requires access to class instances in several situations where the class instance is not provided explicitly. In these cases, the only information available to the implementation is the name of the class.

To resolve class names to class instances, JDO implementations will use Class.forName (String name, ClassLoader loader) with up to three loaders. These loaders will be used in this order:


Constructor Summary
(package private) JDOClassResolver(PersistenceManagerImpl pm, ClassLoader cl)
           
 
Method Summary
 boolean canResolveClass(String className)
           
 boolean equals(Object other)
          Returns true if the two JDOClassResolvers use the same list of ClassLoaders, since they will resolve classes in exactly the same way.
 int hashCode()
          This method must be overridden for the standard hashCode() contract that is used when overriding the equals methos.
 Class resolveClass(String className)
          Resolve the class for the specified name.
 InputStream resolveResource(String resourceName)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
, clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

JDOClassResolver

JDOClassResolver(PersistenceManagerImpl pm,
                 ClassLoader cl)
Method Detail

resolveClass

public Class resolveClass(String className)
Description copied from interface: ClassResolver
Resolve the class for the specified name.
Specified by:
resolveClass in interface ClassResolver
Following copied from interface: com.solarmetric.util.classes.ClassResolver
Parameters:
className - the specified name to load
Returns:
the resolved class
Throws:
JDOFatalUserException - if the class cannot be loaded.

resolveResource

public InputStream resolveResource(String resourceName)
Specified by:
resolveResource in interface ClassResolver

canResolveClass

public boolean canResolveClass(String className)
Specified by:
canResolveClass in interface ClassResolver

toString

public String toString()
Overrides:
toString in class Object

equals

public boolean equals(Object other)
Returns true if the two JDOClassResolvers use the same list of ClassLoaders, since they will resolve classes in exactly the same way.
Specified by:
equals in interface ClassResolver
Overrides:
equals in class Object
Following copied from interface: com.solarmetric.util.classes.ClassResolver
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Description copied from interface: ClassResolver
This method must be overridden for the standard hashCode() contract that is used when overriding the equals methos.
Specified by:
hashCode in interface ClassResolver
Overrides:
hashCode in class Object
Following copied from interface: com.solarmetric.util.classes.ClassResolver
See Also:
Object.hashCode()

SolarMetric Kodo JDO 2.5.8 generated on January 11 2004

Copyright 2001,2002,2003 SolarMetric, Inc. All Rights Reserved.