edu.umd.cs.findbugs.ba.bcp
Class Monitorenter
java.lang.Object
edu.umd.cs.findbugs.ba.bcp.PatternElement
edu.umd.cs.findbugs.ba.bcp.SingleInstruction
edu.umd.cs.findbugs.ba.bcp.OneVariableInstruction
edu.umd.cs.findbugs.ba.bcp.Monitorenter
public class Monitorenter
- extends OneVariableInstruction
A PatternElement for matching a MONITORENTER instruction.
- Author:
- DavidHovemeyer
Constructor Summary |
Monitorenter(java.lang.String varName)
Constructor. |
Method Summary |
MatchResult |
match(org.apache.bcel.generic.InstructionHandle handle,
org.apache.bcel.generic.ConstantPoolGen cpg,
ValueNumberFrame before,
ValueNumberFrame after,
BindingSet bindingSet)
Return whether or not this element matches the given
instruction with the given Bindings in effect. |
Methods inherited from class edu.umd.cs.findbugs.ba.bcp.PatternElement |
addOrCheckDefinition, allowTrailingEdges, dominatedBy, getDominatedBy, getLabel, getNext, label, lookup, setAllowTrailingEdges, setIndex, setNext, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Monitorenter
public Monitorenter(java.lang.String varName)
- Constructor.
- Parameters:
varName
- name of the variable representing the reference
to the object being locked
match
public MatchResult match(org.apache.bcel.generic.InstructionHandle handle,
org.apache.bcel.generic.ConstantPoolGen cpg,
ValueNumberFrame before,
ValueNumberFrame after,
BindingSet bindingSet)
throws DataflowAnalysisException
- Description copied from class:
PatternElement
- Return whether or not this element matches the given
instruction with the given Bindings in effect.
- Specified by:
match
in class PatternElement
- Parameters:
handle
- the instructioncpg
- the ConstantPoolGen from the methodbefore
- the ValueNumberFrame representing values in the Java stack frame
just before the execution of the instructionafter
- the ValueNumberFrame representing values in the Java stack frame
just after the execution of the instructionbindingSet
- the set of Bindings
- Returns:
- if the match is successful, returns a MatchResult with the PatternElement
and BindingSet; if the match is not successful, returns null
- Throws:
DataflowAnalysisException
FindBugs™ is licenced under the LGPL. Copyright © 2006 University of Maryland.