org.jibx.util
Class DummyClassLocator

java.lang.Object
  extended by org.jibx.util.DummyClassLocator
All Implemented Interfaces:
IClassLocator

public class DummyClassLocator
extends java.lang.Object
implements IClassLocator

Dummy class locator, used when no class information is available. This returns only place holder class information.

Author:
Dennis M. Sosnoski

Nested Class Summary
private  class DummyClassLocator.DummyClassInfo
          (Very) partial implementation of class information interface, used as a place holder for classes.
 
Field Summary
private  IClass s_objectDummy
          Singleton instance of root class information.
 
Constructor Summary
DummyClassLocator()
           
 
Method Summary
 IClass getClassInfo(java.lang.String name)
          Get class information.
 IClass getRequiredClassInfo(java.lang.String name)
          Get required class information.
 boolean isLookupSupported()
          Check if class lookup is supported.
 java.lang.Class loadClass(java.lang.String name)
          Load class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

s_objectDummy

private final IClass s_objectDummy
Singleton instance of root class information.

Constructor Detail

DummyClassLocator

public DummyClassLocator()
Method Detail

isLookupSupported

public boolean isLookupSupported()
Check if class lookup is supported. Always returns false to indicate that lookup methods return only place holder class information.

Specified by:
isLookupSupported in interface IClassLocator
Returns:
false

getClassInfo

public IClass getClassInfo(java.lang.String name)
Get class information.

Specified by:
getClassInfo in interface IClassLocator
Parameters:
name - fully-qualified name of class to be found
Returns:
class information, or null if class not found

getRequiredClassInfo

public IClass getRequiredClassInfo(java.lang.String name)
Get required class information. This is just like getClassInfo(String), but throws a runtime exception rather than returning null.

Specified by:
getRequiredClassInfo in interface IClassLocator
Parameters:
name - fully-qualified name of class to be found
Returns:
class information (non-null)

loadClass

public java.lang.Class loadClass(java.lang.String name)
Load class. This just loads and returns the class, if it's available on the classpath.

Specified by:
loadClass in interface IClassLocator
Parameters:
name - fully-qualified class name
Returns:
loaded class, or null if not found


Project Web Site