edu.umd.cs.findbugs

Class LocalVariableAnnotation

public class LocalVariableAnnotation extends Object implements BugAnnotation

Bug annotation class for local variable names

Author: William Pugh

See Also: BugAnnotation

Constructor Summary
LocalVariableAnnotation(String name, int register, int pc)
Constructor.
Method Summary
voidaccept(BugAnnotationVisitor visitor)
intcompareTo(BugAnnotation o)
Stringformat(String key, ClassAnnotation primaryClass)
StringgetDescription()
static LocalVariableAnnotationgetLocalVariableAnnotation(Method method, Location location, IndexedInstruction ins)
static LocalVariableAnnotationgetLocalVariableAnnotation(Method method, int local, int position1, int position2)
StringgetName()
booleanisSignificant()
voidsetDescription(String description)
voidwriteXML(XMLOutput xmlOutput)
voidwriteXML(XMLOutput xmlOutput, boolean addMessages)

Constructor Detail

LocalVariableAnnotation

public LocalVariableAnnotation(String name, int register, int pc)
Constructor.

Parameters: name the name of the local variable register the local variable index pc the bytecode offset of the instruction that mentions this local variable

Method Detail

accept

public void accept(BugAnnotationVisitor visitor)

compareTo

public int compareTo(BugAnnotation o)

format

public String format(String key, ClassAnnotation primaryClass)

getDescription

public String getDescription()

getLocalVariableAnnotation

public static LocalVariableAnnotation getLocalVariableAnnotation(Method method, Location location, IndexedInstruction ins)

getLocalVariableAnnotation

public static LocalVariableAnnotation getLocalVariableAnnotation(Method method, int local, int position1, int position2)

getName

public String getName()

Returns: name of local variable

isSignificant

public boolean isSignificant()

setDescription

public void setDescription(String description)

writeXML

public void writeXML(XMLOutput xmlOutput)

writeXML

public void writeXML(XMLOutput xmlOutput, boolean addMessages)
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.