Package org.jibx.custom.classes
Class ClassSourceLocator
java.lang.Object
org.jibx.custom.classes.ClassSourceLocator
- All Implemented Interfaces:
IClassSourceLocator
,IClassLocator
Locator that supports both class file lookup and source file lookup.
- Author:
- Dennis M. Sosnoski
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetClassInfo
(String name) Get the information for a class.getRequiredClassInfo
(String name) Get required class information.JavaClass
getSourceInfo
(String name) Get the source code information for a class.boolean
Check if class lookup is supported.Load class.
-
Field Details
-
m_sourcePaths
Paths for source lookup. -
m_builder
private final JavaDocBuilder m_builderSource file parser. -
m_lookupSet
Set of classes parsed.
-
-
Constructor Details
-
ClassSourceLocator
Constructor.- Parameters:
paths
- source lookup paths (may be empty, but notnull
)
-
-
Method Details
-
isLookupSupported
public boolean isLookupSupported()Check if class lookup is supported. This always returnstrue
.- Specified by:
isLookupSupported
in interfaceIClassLocator
- Returns:
true
-
getSourceInfo
Get the source code information for a class.- Specified by:
getSourceInfo
in interfaceIClassSourceLocator
- Parameters:
name
- fully-qualified class name (using '$' as inner class marker)- Returns:
- source code information,
null
if not available
-
getClassInfo
Get the information for a class.- Specified by:
getClassInfo
in interfaceIClassLocator
- Parameters:
name
- fully-qualified class name (using '$' as inner class marker)- Returns:
- class information, or
null
if not found
-
getRequiredClassInfo
Get required class information. If the class cannot be found a runtime exception is thrown.- Specified by:
getRequiredClassInfo
in interfaceIClassLocator
- Parameters:
name
- fully-qualified name of class to be found- Returns:
- class information
-
loadClass
Load class.- Specified by:
loadClass
in interfaceIClassLocator
- Parameters:
name
- fully-qualified class name- Returns:
- loaded class, or
null
if not found
-