public class LocalVariableAnnotation extends Object implements BugAnnotation
BugAnnotation,
Serialized Form| Modifier and Type | Field and Description |
|---|---|
static String |
ARGUMENT_ROLE |
static String |
DEFAULT_ROLE |
static String |
DID_YOU_MEAN_ROLE |
static String |
INVOKED_ON_ROLE |
static String |
NAMED_ROLE |
static String |
PARAMETER_NAMED_ROLE |
static String |
PARAMETER_ROLE |
static String |
PARAMETER_VALUE_SOURCE_NAMED_ROLE |
static String |
PARAMETER_VALUE_SOURCE_ROLE |
static String |
UNKNOWN_ROLE |
static String |
VALUE_DOOMED_NAMED_ROLE |
static String |
VALUE_DOOMED_ROLE |
static String |
VALUE_OF_ROLE |
MESSAGE_TAG| Constructor and Description |
|---|
LocalVariableAnnotation(String name,
int register,
int pc)
Constructor.
|
LocalVariableAnnotation(String name,
int register,
int pc,
int line)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(BugAnnotationVisitor visitor)
Accept a BugAnnotationVisitor.
|
Object |
clone() |
int |
compareTo(BugAnnotation o) |
boolean |
equals(Object o) |
static LocalVariableAnnotation |
findMatchingIgnoredParameter(ClassContext classContext,
org.apache.bcel.classfile.Method method,
String name,
String signature) |
static LocalVariableAnnotation |
findUniqueBestMatchingParameter(ClassContext classContext,
org.apache.bcel.classfile.Method method,
String name,
String signature) |
String |
format(String key,
ClassAnnotation primaryClass)
Format the annotation as a String.
|
String |
getDescription()
Get a description of this bug annotation.
|
static LocalVariableAnnotation |
getLocalVariableAnnotation(DismantleBytecode visitor,
OpcodeStack.Item item) |
static LocalVariableAnnotation |
getLocalVariableAnnotation(org.apache.bcel.classfile.Method method,
int local,
int position1,
int position2) |
static LocalVariableAnnotation |
getLocalVariableAnnotation(org.apache.bcel.classfile.Method method,
Location location,
org.apache.bcel.generic.IndexedInstruction ins) |
static LocalVariableAnnotation |
getLocalVariableAnnotation(org.apache.bcel.classfile.Method method,
OpcodeStack.Item item,
int pc) |
String |
getName() |
static LocalVariableAnnotation |
getParameterLocalVariableAnnotation(org.apache.bcel.classfile.Method method,
int local)
Get a local variable annotation describing a parameter.
|
int |
getPC() |
int |
getRegister() |
int |
hashCode() |
boolean |
isNamed() |
boolean |
isSignificant()
Is this annotation used to compute instance hashes or match bug instances
across versions
|
void |
setDescription(String description)
Set a description of this bug annotation.
|
String |
toString() |
String |
toString(ClassAnnotation primaryClass) |
void |
writeXML(XMLOutput xmlOutput)
Write this object to given XMLOutput.
|
void |
writeXML(XMLOutput xmlOutput,
boolean addMessages,
boolean isPrimary) |
public static final String DEFAULT_ROLE
public static final String NAMED_ROLE
public static final String UNKNOWN_ROLE
public static final String PARAMETER_ROLE
public static final String PARAMETER_NAMED_ROLE
public static final String PARAMETER_VALUE_SOURCE_ROLE
public static final String PARAMETER_VALUE_SOURCE_NAMED_ROLE
public static final String VALUE_DOOMED_ROLE
public static final String VALUE_DOOMED_NAMED_ROLE
public static final String DID_YOU_MEAN_ROLE
public static final String INVOKED_ON_ROLE
public static final String ARGUMENT_ROLE
public static final String VALUE_OF_ROLE
public LocalVariableAnnotation(String name, int register, int pc)
name - the name of the local variableregister - the local variable indexpc - the bytecode offset of the instruction that mentions this
local variablepublic LocalVariableAnnotation(String name, int register, int pc, int line)
name - the name of the local variableregister - the local variable indexpc - the bytecode offset of the instruction that mentions this
local variablepublic static LocalVariableAnnotation getLocalVariableAnnotation(org.apache.bcel.classfile.Method method, Location location, org.apache.bcel.generic.IndexedInstruction ins)
public static LocalVariableAnnotation getLocalVariableAnnotation(org.apache.bcel.classfile.Method method, int local, int position1, int position2)
public static LocalVariableAnnotation getParameterLocalVariableAnnotation(org.apache.bcel.classfile.Method method, int local)
method - a Methodlocal - the local variable containing the parameterpublic Object clone()
clone in interface BugAnnotationclone in class Objectpublic void accept(BugAnnotationVisitor visitor)
BugAnnotationaccept in interface BugAnnotationvisitor - the visitor to acceptpublic String format(String key, ClassAnnotation primaryClass)
BugAnnotationformat in interface BugAnnotationkey - how the annotation should be formattedprimaryClass - The primary class for the bug; some bug annotation format msgs
are simplified in relation to that class.public void setDescription(String description)
BugAnnotationsetDescription in interface BugAnnotationpublic String getDescription()
BugAnnotationgetDescription in interface BugAnnotationpublic int compareTo(BugAnnotation o)
compareTo in interface Comparable<BugAnnotation>public void writeXML(XMLOutput xmlOutput) throws IOException
XMLWriteablewriteXML in interface XMLWriteablexmlOutput - the XMLOutput for the documentIOExceptionpublic void writeXML(XMLOutput xmlOutput, boolean addMessages, boolean isPrimary) throws IOException
writeXML in interface XMLWriteableWithMessagesIOExceptionpublic boolean isNamed()
public String getName()
public int getPC()
public int getRegister()
public boolean isSignificant()
BugAnnotationisSignificant in interface BugAnnotation@CheckForNull public static LocalVariableAnnotation getLocalVariableAnnotation(org.apache.bcel.classfile.Method method, OpcodeStack.Item item, int pc)
@CheckForNull public static LocalVariableAnnotation getLocalVariableAnnotation(DismantleBytecode visitor, OpcodeStack.Item item)
@CheckForNull public static LocalVariableAnnotation findMatchingIgnoredParameter(ClassContext classContext, org.apache.bcel.classfile.Method method, String name, String signature)
@CheckForNull public static LocalVariableAnnotation findUniqueBestMatchingParameter(ClassContext classContext, org.apache.bcel.classfile.Method method, String name, String signature)
public String toString(ClassAnnotation primaryClass)
toString in interface BugAnnotationCopyright © 2003–2015. All rights reserved.