Package org.jibx.custom.classes
Class ClassSourceLocator
- java.lang.Object
-
- org.jibx.custom.classes.ClassSourceLocator
-
- All Implemented Interfaces:
IClassSourceLocator,IClassLocator
public class ClassSourceLocator extends java.lang.Object implements IClassSourceLocator
Locator that supports both class file lookup and source file lookup.- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description private JavaDocBuilderm_builderSource file parser.private java.util.Setm_lookupSetSet of classes parsed.private java.lang.String[]m_sourcePathsPaths for source lookup.
-
Constructor Summary
Constructors Constructor Description ClassSourceLocator(java.lang.String[] paths)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IClassgetClassInfo(java.lang.String name)Get the information for a class.IClassgetRequiredClassInfo(java.lang.String name)Get required class information.JavaClassgetSourceInfo(java.lang.String name)Get the source code information for a class.booleanisLookupSupported()Check if class lookup is supported.java.lang.ClassloadClass(java.lang.String name)Load class.
-
-
-
Method Detail
-
isLookupSupported
public boolean isLookupSupported()
Check if class lookup is supported. This always returnstrue.- Specified by:
isLookupSupportedin interfaceIClassLocator- Returns:
true
-
getSourceInfo
public JavaClass getSourceInfo(java.lang.String name)
Get the source code information for a class.- Specified by:
getSourceInfoin interfaceIClassSourceLocator- Parameters:
name- fully-qualified class name (using '$' as inner class marker)- Returns:
- source code information,
nullif not available
-
getClassInfo
public IClass getClassInfo(java.lang.String name)
Get the information for a class.- Specified by:
getClassInfoin interfaceIClassLocator- Parameters:
name- fully-qualified class name (using '$' as inner class marker)- Returns:
- class information, or
nullif not found
-
getRequiredClassInfo
public IClass getRequiredClassInfo(java.lang.String name)
Get required class information. If the class cannot be found a runtime exception is thrown.- Specified by:
getRequiredClassInfoin interfaceIClassLocator- Parameters:
name- fully-qualified name of class to be found- Returns:
- class information
-
loadClass
public java.lang.Class loadClass(java.lang.String name)
Load class.- Specified by:
loadClassin interfaceIClassLocator- Parameters:
name- fully-qualified class name- Returns:
- loaded class, or
nullif not found
-
-