Class TypeSet.AbstractResolver
- java.lang.Object
-
- net.sourceforge.pmd.lang.java.symboltable.TypeSet.AbstractResolver
-
- All Implemented Interfaces:
TypeSet.Resolver
- Direct Known Subclasses:
TypeSet.CurrentPackageResolver,TypeSet.ExplicitImportResolver,TypeSet.FullyQualifiedNameResolver,TypeSet.ImplicitImportResolver,TypeSet.ImportOnDemandResolver
- Enclosing class:
- TypeSet
public abstract static class TypeSet.AbstractResolver extends java.lang.Object implements TypeSet.Resolver
Base Resolver class that support aPMDASMClassLoaderclass loader.
-
-
Field Summary
Fields Modifier and Type Field Description protected PMDASMClassLoaderpmdClassLoaderthe class loader.
-
Constructor Summary
Constructors Constructor Description AbstractResolver(PMDASMClassLoader pmdClassLoader)Creates a new AbstractResolver that uses the given class loader.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancouldResolve(java.lang.String name)Checks if the given class could be resolved by this resolver.protected java.lang.Class<?>resolveMaybeInner(java.lang.String name, java.lang.String fqName)Resolves the given class name with the given FQCN, considering it may be an inner class.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.lang.java.symboltable.TypeSet.Resolver
resolve
-
-
-
-
Field Detail
-
pmdClassLoader
protected final PMDASMClassLoader pmdClassLoader
the class loader.
-
-
Constructor Detail
-
AbstractResolver
public AbstractResolver(PMDASMClassLoader pmdClassLoader)
Creates a new AbstractResolver that uses the given class loader.- Parameters:
pmdClassLoader- the class loader to use
-
-
Method Detail
-
resolveMaybeInner
protected java.lang.Class<?> resolveMaybeInner(java.lang.String name, java.lang.String fqName)Resolves the given class name with the given FQCN, considering it may be an inner class.- Parameters:
name- The name of the class to load.fqName- The proposed FQCN for the class.- Returns:
- The matched class or null if not found.
-
couldResolve
public boolean couldResolve(java.lang.String name)
Description copied from interface:TypeSet.ResolverChecks if the given class could be resolved by this resolver. Notice, that a resolver's ability to resolve a class does not imply that the class will actually be found and resolved.- Specified by:
couldResolvein interfaceTypeSet.Resolver- Parameters:
name- the name of the class, might be fully classified or not.- Returns:
- whether the class can be resolved
-
-