|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.pmd.lang.java.symboltable.TypeSet
public class TypeSet
Keeps track of the types encountered in a ASTCompilationUnit
Nested Class Summary | |
---|---|
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 Summary | |
---|---|
TypeSet()
The TypeSet provides type resolution for the symbol facade. |
|
TypeSet(ClassLoader classLoader)
The TypeSet provides type resolution for the symbol facade. |
Method Summary | |
---|---|
void |
addImport(String importString)
Adds a import to the list of imports |
Class<?> |
findClass(String name)
Resolves a class by its name using all known resolvers. |
String |
getASTCompilationUnitPackage()
|
Set<String> |
getExplicitImports()
|
int |
getImportsCount()
|
boolean |
hasAuxclasspath()
Whether the classloader is using the auxclasspath or not. |
void |
setASTCompilationUnitPackage(String pkg)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TypeSet()
TypeSet
provides type resolution for the symbol facade.
public TypeSet(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)Method Detail |
---|
public boolean hasAuxclasspath()
true
if the classloader is using the auxclasspath featurepublic void setASTCompilationUnitPackage(String pkg)
public String getASTCompilationUnitPackage()
public void addImport(String importString)
importString
- the import to addpublic int getImportsCount()
public Set<String> getExplicitImports()
public Class<?> findClass(String name) throws ClassNotFoundException
name
- the name of the class, can be a simple name or a fully qualified name.
ClassNotFoundException
- if there is no such class
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |