public class LoadedFieldSet
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
LoadedFieldSet.LoadStoreCount
Count number of times a field is loaded and/or stored in the method.
|
Constructor and Description |
---|
LoadedFieldSet(org.apache.bcel.generic.MethodGen methodGen)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addLoad(org.apache.bcel.generic.InstructionHandle handle,
XField field)
Add a load of given field at given instruction.
|
void |
addStore(org.apache.bcel.generic.InstructionHandle handle,
XField field)
Add a store of given field at given instruction.
|
XField |
getField(org.apache.bcel.generic.InstructionHandle handle)
Get the field loaded or stored at given instruction, if any.
|
LoadedFieldSet.LoadStoreCount |
getLoadStoreCount(XField field)
Get the number of times given field is loaded and stored within the
method.
|
boolean |
instructionIsLoad(org.apache.bcel.generic.InstructionHandle handle)
Return whether or not the given instruction is a load.
|
boolean |
isLoaded(XField field)
Return whether or not the given field is loaded by any instruction in the
method.
|
public LoadedFieldSet(org.apache.bcel.generic.MethodGen methodGen)
methodGen
- the method being analyzed for loads/storespublic LoadedFieldSet.LoadStoreCount getLoadStoreCount(XField field)
field
- the fieldpublic void addLoad(org.apache.bcel.generic.InstructionHandle handle, XField field)
handle
- the instructionfield
- the fieldpublic void addStore(org.apache.bcel.generic.InstructionHandle handle, XField field)
handle
- the instructionfield
- the fieldpublic XField getField(org.apache.bcel.generic.InstructionHandle handle)
handle
- the instructionpublic boolean isLoaded(XField field)
field
- the fieldpublic boolean instructionIsLoad(org.apache.bcel.generic.InstructionHandle handle)
handle
- the instructionFindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.