Package org.jibx.util
Class DummyClassLocator
- java.lang.Object
-
- org.jibx.util.DummyClassLocator
-
- All Implemented Interfaces:
IClassLocator
public class DummyClassLocator extends Object implements IClassLocator
Dummy class locator, used when no class information is available. This returns only place holder class information.- Author:
- Dennis M. Sosnoski
-
-
Constructor Summary
Constructors Constructor Description DummyClassLocator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IClassgetClassInfo(String name)Get class information.IClassgetRequiredClassInfo(String name)Get required class information.booleanisLookupSupported()Check if class lookup is supported.ClassloadClass(String name)Load class.
-
-
-
Method Detail
-
isLookupSupported
public boolean isLookupSupported()
Check if class lookup is supported. Always returnsfalseto indicate that lookup methods return only place holder class information.- Specified by:
isLookupSupportedin interfaceIClassLocator- Returns:
false
-
getClassInfo
public IClass getClassInfo(String name)
Get class information.- Specified by:
getClassInfoin interfaceIClassLocator- Parameters:
name- fully-qualified name of class to be found- Returns:
- class information, or
nullif class not found
-
getRequiredClassInfo
public IClass getRequiredClassInfo(String name)
Get required class information. This is just likegetClassInfo(String), but throws a runtime exception rather than returningnull.- Specified by:
getRequiredClassInfoin interfaceIClassLocator- Parameters:
name- fully-qualified name of class to be found- Returns:
- class information (non-
null)
-
loadClass
public Class loadClass(String name)
Load class. This just loads and returns the class, if it's available on the classpath.- Specified by:
loadClassin interfaceIClassLocator- Parameters:
name- fully-qualified class name- Returns:
- loaded class, or
nullif not found
-
-