Class ClassPathImpl
java.lang.Object
edu.umd.cs.findbugs.classfile.impl.ClassPathImpl
- All Implemented Interfaces:
IClassPath
,AutoCloseable
Implementation of IClassPath.
- Author:
- David Hovemeyer
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addCodeBase
(ICodeBase codeBase) Add a codebase.Return an iterator over the application codebases.Return an iterator over the auxiliary codebases.void
close()
Close all of the code bases that are part of this class path.Returns all of the application code base entries that are part of this class path.lookupResource
(String resourceName) Lookup a resource by name.void
mapResourceNameToCodeBaseEntry
(String resourceName, ICodeBaseEntry codeBaseEntry) Add a resource name to codebase entry mapping.toString()
-
Constructor Details
-
ClassPathImpl
public ClassPathImpl()
-
-
Method Details
-
toString
-
addCodeBase
Description copied from interface:IClassPath
Add a codebase. The object will be interrogated to determine whether it is an application codebase or an auxiliary codebase. Application codebases must be scannable.- Specified by:
addCodeBase
in interfaceIClassPath
- Parameters:
codeBase
- the codebase to add
-
appCodeBaseIterator
Description copied from interface:IClassPath
Return an iterator over the application codebases.- Specified by:
appCodeBaseIterator
in interfaceIClassPath
- Returns:
- iterator over the application codebases
-
auxCodeBaseIterator
Description copied from interface:IClassPath
Return an iterator over the auxiliary codebases.- Specified by:
auxCodeBaseIterator
in interfaceIClassPath
- Returns:
- iterator over the auxiliary codebases
-
close
public void close()Description copied from interface:IClassPath
Close all of the code bases that are part of this class path. This should be done once the client is finished with the classpath.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceIClassPath
-
getApplicationCodebaseEntries
Description copied from interface:IClassPath
Returns all of the application code base entries that are part of this class path.- Specified by:
getApplicationCodebaseEntries
in interfaceIClassPath
- Returns:
- map where the key is slashed (VM) class name with ".class" suffix
-
lookupResource
Description copied from interface:IClassPath
Lookup a resource by name.- Specified by:
lookupResource
in interfaceIClassPath
- Parameters:
resourceName
- name of the resource to look up- Returns:
- ICodeBaseEntry representing the resource
- Throws:
ResourceNotFoundException
- if the resource is not found
-
mapResourceNameToCodeBaseEntry
Description copied from interface:IClassPath
Add a resource name to codebase entry mapping. Once this is done, future lookups of this resource will automatically resolve to the given codebase entry.- Specified by:
mapResourceNameToCodeBaseEntry
in interfaceIClassPath
- Parameters:
resourceName
- the resource name to mapcodeBaseEntry
- the codebase entry to use for this resource
-