public class TypeSet
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
TypeSet.AbstractResolver |
Base Resolver class that support a
PMDASMClassLoader class
loader. |
static class |
TypeSet.CurrentPackageResolver |
Resolver that uses the current package to resolve a simple class name.
|
static class |
TypeSet.ExplicitImportResolver |
Resolver that tries to resolve the given simple class name with the
explicit import statements.
|
static class |
TypeSet.FullyQualifiedNameResolver |
Resolver that simply loads the class by name.
|
static class |
TypeSet.ImplicitImportResolver |
Resolver that resolves simple class names from the implicit import of
java.lang.* . |
static class |
TypeSet.ImportOnDemandResolver |
Resolver that uses the "on demand" import statements.
|
static class |
TypeSet.PrimitiveTypeResolver |
Resolver that resolves primitive types such as int or double.
|
static interface |
TypeSet.Resolver |
A resolver that can resolve a class by name.
|
static class |
TypeSet.VoidResolver |
Resolver that resolves the "void" type.
|
Constructor | Description |
---|---|
TypeSet() |
The
TypeSet provides type resolution for the symbol facade. |
TypeSet(java.lang.ClassLoader classLoader) |
The
TypeSet provides type resolution for the symbol facade. |
Modifier and Type | Method | Description |
---|---|---|
void |
addImport(java.lang.String importString) |
Adds a import to the list of imports
|
java.lang.Class<?> |
findClass(java.lang.String name) |
Resolves a class by its name using all known resolvers.
|
java.lang.String |
getASTCompilationUnitPackage() |
|
java.util.Set<java.lang.String> |
getExplicitImports() |
|
int |
getImportsCount() |
|
boolean |
hasAuxclasspath() |
Whether the classloader is using the auxclasspath or not.
|
void |
setASTCompilationUnitPackage(java.lang.String pkg) |
public TypeSet()
TypeSet
provides type resolution for the symbol facade.public TypeSet(java.lang.ClassLoader classLoader)
TypeSet
provides type resolution for the symbol facade.classLoader
- the class loader to use to search classes (could be an
auxiliary class path)public boolean hasAuxclasspath()
true
if the classloader is using the auxclasspath
featurepublic void setASTCompilationUnitPackage(java.lang.String pkg)
public java.lang.String getASTCompilationUnitPackage()
public void addImport(java.lang.String importString)
importString
- the import to addpublic int getImportsCount()
public java.util.Set<java.lang.String> getExplicitImports()
public java.lang.Class<?> findClass(java.lang.String name)
name
- the name of the class, can be a simple name or a fully
qualified name.null
if none foundCopyright © 2002–2018 PMD. All rights reserved.