edu.umd.cs.findbugs.visitclass
Class PreorderVisitor
public abstract
class
PreorderVisitor
extends BetterVisitor
implements Constants2
Interface to make the use of a visitor pattern programming style possible.
I.e. a class that implements this interface can traverse the contents of
a Java class just by calling the `accept' method which all classes have.
Implemented by wish of
Boris Bokowski.
If don't like it, blame him. If you do like it thank me 8-)
Version: 970819
Author: M. Dahm
Method Summary |
protected int | asUnsignedByte(byte b) |
void | doVisitMethod(Method method) |
String | getClassName() Get the slash-formatted class name for the current or most recently visited class |
Code | getCode()
Return the current Code attribute; assuming one is being visited |
ConstantPool | getConstantPool() Get the constant pool for the current or most recently visited class |
String | getDottedClassName() Get the dotted class name for the current or most recently visited class |
String | getDottedMethodSig() If currently visiting a method, get the method's dotted method signature |
String | getDottedSuperclassName() Get the dotted superclass name for the current or most recently visited class |
Field | getField() If currently visiting a method, get the method's Method object |
boolean | getFieldIsStatic() If currently visiting a field, return whether or not the field is static |
String | getFieldName() If currently visiting a field, get the field's name |
String | getFieldSig() If currently visiting a field, get the field's slash-formatted signature |
String | getFullyQualifiedFieldName() If currently visiting a field, get the field's fully qualified name |
String | getFullyQualifiedMethodName() If currently visiting a method, get the method's fully qualified name |
Method | getMethod() If currently visiting a method, get the method's Method object |
String | getMethodName() If currently visiting a method, get the method's name |
String | getMethodSig() If currently visiting a method, get the method's slash-formatted signature |
static int | getNumberArguments(String signature) |
int | getNumberMethodArguments() |
String | getPackageName() Get the (slash-formatted?) |
int | getSizeOfSurroundingTryBlock(int pc)
Get lines of code in try block that surround pc |
int | getSizeOfSurroundingTryBlock(String vmNameOfExceptionClass, int pc)
Get lines of code in try block that surround pc |
String | getSourceFile() Get the source file name for the current or most recently visited class |
protected String | getStringFromIndex(int i) |
String | getSuperclassName() Get the slash-formatted superclass name for the current or most recently visited class |
Set<String> | getSurroundingCaughtExceptions(int pc) |
JavaClass | getThisClass() Get the JavaClass object for the current or most recently visited class |
void | setupVisitorForClass(JavaClass obj) |
void | visitAfter(JavaClass obj) |
boolean | visitingField()
is the visitor currently visiting a field? |
boolean | visitingMethod()
is the visitor currently visiting a method? |
protected int asUnsignedByte(byte b)
public void doVisitMethod(Method method)
public String getClassName()
Get the slash-formatted class name for the current or most recently visited class
public Code getCode()
Return the current Code attribute; assuming one is being visited
Returns: current code attribute
public ConstantPool getConstantPool()
Get the constant pool for the current or most recently visited class
public String getDottedClassName()
Get the dotted class name for the current or most recently visited class
public String getDottedMethodSig()
If currently visiting a method, get the method's dotted method signature
public String getDottedSuperclassName()
Get the dotted superclass name for the current or most recently visited class
public Field getField()
If currently visiting a method, get the method's Method object
public boolean getFieldIsStatic()
If currently visiting a field, return whether or not the field is static
public String getFieldName()
If currently visiting a field, get the field's name
public String getFieldSig()
If currently visiting a field, get the field's slash-formatted signature
public String getFullyQualifiedFieldName()
If currently visiting a field, get the field's fully qualified name
public String getFullyQualifiedMethodName()
If currently visiting a method, get the method's fully qualified name
public Method getMethod()
If currently visiting a method, get the method's Method object
public String getMethodName()
If currently visiting a method, get the method's name
public String getMethodSig()
If currently visiting a method, get the method's slash-formatted signature
public static int getNumberArguments(String signature)
public int getNumberMethodArguments()
public String getPackageName()
Get the (slash-formatted?) package name for the current or most recently visited class
public int getSizeOfSurroundingTryBlock(int pc)
Get lines of code in try block that surround pc
Parameters: pc
Returns: number of lines of code in try block
public int getSizeOfSurroundingTryBlock(String vmNameOfExceptionClass, int pc)
Get lines of code in try block that surround pc
Parameters: pc
Returns: number of lines of code in try block
public String getSourceFile()
Get the source file name for the current or most recently visited class
protected String getStringFromIndex(int i)
public String getSuperclassName()
Get the slash-formatted superclass name for the current or most recently visited class
public Set<String> getSurroundingCaughtExceptions(int pc)
public JavaClass getThisClass()
Get the JavaClass object for the current or most recently visited class
public void setupVisitorForClass(JavaClass obj)
public void visitAfter(JavaClass obj)
public boolean visitingField()
is the visitor currently visiting a field?
public boolean visitingMethod()
is the visitor currently visiting a method?
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.