public class LibraryTypeOracle extends TypeOracle
Modifier and Type | Class and Description |
---|---|
static class |
LibraryTypeOracle.UnsupportedTypeOracleAccess
An exception indicating that the Library flavor of TypeOracle does not support the requested
behavior.
|
TAG_TYPEARGS
Constructor and Description |
---|
LibraryTypeOracle(CompilerContext compilerContext) |
Modifier and Type | Method and Description |
---|---|
void |
ensureAllLoaded()
Make sure that all possible Types have been read and made available for querying.
|
JPackage |
findPackage(String pkgName)
Attempts to find a package by name.
|
JClassType |
findType(String typeSourceName)
Finds a type (even nested ones) given its fully-qualified name.
|
JClassType |
findType(String pkgName,
String shortName)
Finds a type (even nested ones) given its package-relative name.
|
JPackage |
getPackage(String pkgName)
Gets a package by name.
|
JPackage[] |
getPackages()
Gets an array of all packages known to this type oracle.
|
CompilationUnitTypeOracleUpdater |
getTypeOracleUpdater() |
addNewType, getArrayType, getDualJsoImplInterfaces, getJavaLangObject, getJavaScriptObject, getOrCreatePackage, getParameterizedType, getParameterizedType, getReloadCount, getSingleJsoImpl, getSingleJsoImplInterfaces, getType, getType, getTypes, getWildcardType, parse, sort, sort, sort, sort
sort, sort, sort, sort
public LibraryTypeOracle(CompilerContext compilerContext)
public void ensureAllLoaded()
TypeOracle
ensureAllLoaded
in class TypeOracle
public JPackage findPackage(String pkgName)
TypeOracle
findPackage
in class TypeOracle
null
if the package could not be foundpublic JClassType findType(String typeSourceName)
TypeOracle
findType
in class TypeOracle
typeSourceName
- fully-qualified class/interface name - for nested classes, use its source name
rather than its binary name (that is, use a "." rather than a "$")null
if the type is not foundpublic JClassType findType(String pkgName, String shortName)
TypeOracle
findType
in class TypeOracle
null
if the type is not foundpublic JPackage getPackage(String pkgName) throws NotFoundException
TypeOracle
getPackage
in class TypeOracle
NotFoundException
- if getOrCreatePackage
hasn't
been called for this package or any child packagespublic JPackage[] getPackages()
TypeOracle
getPackages
in class TypeOracle
public CompilationUnitTypeOracleUpdater getTypeOracleUpdater()
Copyright © 2018. All rights reserved.