FindBugs™ 1.3.9

edu.umd.cs.findbugs.ba
Class InnerClassAccessMap

java.lang.Object
  extended by edu.umd.cs.findbugs.ba.InnerClassAccessMap

public class InnerClassAccessMap
extends java.lang.Object

Determine which methods are accessors used by inner classes to access fields in their enclosing classes. This has been tested with javac from the Sun JDK 1.4.x, but will probably not work with other source to bytecode compilers.

The instance of InnerClassAccessMap should be retrieved from the AnalysisContext.

Author:
David Hovemeyer
See Also:
InnerClassAccess

Method Summary
 void clearCache()
          Clear the cache.
static InnerClassAccessMap create()
          Create an instance.
 InnerClassAccess getInnerClassAccess(org.apache.bcel.generic.INVOKESTATIC inv, org.apache.bcel.generic.ConstantPoolGen cpg)
          Get the inner class access object for given invokestatic instruction.
 InnerClassAccess getInnerClassAccess(java.lang.String className, java.lang.String methodName)
          Get the InnerClassAccess in given class with the given method name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

create

public static InnerClassAccessMap create()
Create an instance.

Returns:
a new instance of InnerClassAccessMap

getInnerClassAccess

public InnerClassAccess getInnerClassAccess(java.lang.String className,
                                            java.lang.String methodName)
                                     throws java.lang.ClassNotFoundException
Get the InnerClassAccess in given class with the given method name.

Parameters:
className - the name of the class
methodName - the name of the access method
Returns:
the InnerClassAccess object for the method, or null if the method doesn't seem to be an inner class access
Throws:
java.lang.ClassNotFoundException

getInnerClassAccess

public InnerClassAccess getInnerClassAccess(org.apache.bcel.generic.INVOKESTATIC inv,
                                            org.apache.bcel.generic.ConstantPoolGen cpg)
                                     throws java.lang.ClassNotFoundException
Get the inner class access object for given invokestatic instruction. Returns null if the called method is not an inner class access.

Parameters:
inv - the invokestatic instruction
cpg - the ConstantPoolGen for the method
Returns:
the InnerClassAccess, or null if the call is not an inner class access
Throws:
java.lang.ClassNotFoundException

clearCache

public void clearCache()
Clear the cache.


FindBugs™ 1.3.9

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