Package org.jibx.util
Class DummyClassLocator
java.lang.Object
org.jibx.util.DummyClassLocator
- All Implemented Interfaces:
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
Nested ClassesModifier and TypeClassDescriptionprivate class
(Very) partial implementation of class information interface, used as a place holder for classes. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final IClass
Singleton instance of root class information. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClassInfo
(String name) Get class information.getRequiredClassInfo
(String name) Get required class information.boolean
Check if class lookup is supported.Load class.
-
Field Details
-
s_objectDummy
Singleton instance of root class information.
-
-
Constructor Details
-
DummyClassLocator
public DummyClassLocator()
-
-
Method Details
-
isLookupSupported
public boolean isLookupSupported()Check if class lookup is supported. Always returnsfalse
to indicate that lookup methods return only place holder class information.- Specified by:
isLookupSupported
in interfaceIClassLocator
- Returns:
false
-
getClassInfo
Get class information.- Specified by:
getClassInfo
in interfaceIClassLocator
- Parameters:
name
- fully-qualified name of class to be found- Returns:
- class information, or
null
if class not found
-
getRequiredClassInfo
Get required class information. This is just likegetClassInfo(String)
, but throws a runtime exception rather than returningnull
.- Specified by:
getRequiredClassInfo
in interfaceIClassLocator
- Parameters:
name
- fully-qualified name of class to be found- Returns:
- class information (non-
null
)
-
loadClass
Load class. This just loads and returns the class, if it's available on the classpath.- Specified by:
loadClass
in interfaceIClassLocator
- Parameters:
name
- fully-qualified class name- Returns:
- loaded class, or
null
if not found
-