FindBugs™ 1.3.9

edu.umd.cs.findbugs.classfile.impl
Class ClassPathImpl

java.lang.Object
  extended by edu.umd.cs.findbugs.classfile.impl.ClassPathImpl
All Implemented Interfaces:
IClassPath

public class ClassPathImpl
extends java.lang.Object
implements IClassPath

Implementation of IClassPath.

Author:
David Hovemeyer

Constructor Summary
ClassPathImpl()
           
 
Method Summary
 void addCodeBase(ICodeBase codeBase)
          Add a codebase.
 java.util.Iterator<? extends ICodeBase> appCodeBaseIterator()
          Return an iterator over the application codebases.
 java.util.Iterator<? extends ICodeBase> auxCodeBaseIterator()
          Return an iterator over the auxiliary codebases.
 void close()
          Close all of the code bases that are part of this class path.
 ICodeBaseEntry lookupResource(java.lang.String resourceName)
          Lookup a resource by name.
 void mapResourceNameToCodeBaseEntry(java.lang.String resourceName, ICodeBaseEntry codeBaseEntry)
          Add a resource name to codebase entry mapping.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassPathImpl

public ClassPathImpl()
Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

addCodeBase

public void addCodeBase(ICodeBase codeBase)
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 interface IClassPath
Parameters:
codeBase - the codebase to add

appCodeBaseIterator

public java.util.Iterator<? extends ICodeBase> appCodeBaseIterator()
Description copied from interface: IClassPath
Return an iterator over the application codebases.

Specified by:
appCodeBaseIterator in interface IClassPath
Returns:
iterator over the application codebases

auxCodeBaseIterator

public java.util.Iterator<? extends ICodeBase> auxCodeBaseIterator()
Description copied from interface: IClassPath
Return an iterator over the auxiliary codebases.

Specified by:
auxCodeBaseIterator in interface IClassPath
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 interface IClassPath

lookupResource

public ICodeBaseEntry lookupResource(java.lang.String resourceName)
                              throws ResourceNotFoundException
Description copied from interface: IClassPath
Lookup a resource by name.

Specified by:
lookupResource in interface IClassPath
Parameters:
resourceName - name of the resource to look up
Returns:
ICodeBaseEntry representing the resource
Throws:
ResourceNotFoundException - if the resource is not found

mapResourceNameToCodeBaseEntry

public void mapResourceNameToCodeBaseEntry(java.lang.String resourceName,
                                           ICodeBaseEntry codeBaseEntry)
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 interface IClassPath
Parameters:
resourceName - the resource name to map
codeBaseEntry - the codebase entry to use for this resource

FindBugs™ 1.3.9

FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.