Package edu.umd.cs.findbugs.ba.bcp
Class SingleInstruction
java.lang.Object
edu.umd.cs.findbugs.ba.bcp.PatternElement
edu.umd.cs.findbugs.ba.bcp.SingleInstruction
- Direct Known Subclasses:
FieldAccess,OneVariableInstruction
An abstract PatternElement subclass for pattern elements which must match
exactly one instruction and accept any kind of branch. (Subclasses may
override acceptBranch() to implement more selective handling of branches.)
- Author:
- David Hovemeyer
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanacceptBranch(Edge edge, org.apache.bcel.generic.InstructionHandle source) Return whether or not it is acceptable to take the given branch.intmaxOccur()Return the maximum number of instructions this PatternElement must match in the ByteCodePattern.intminOccur()Return the minimum number of instructions this PatternElement must match in the ByteCodePattern.Methods inherited from class edu.umd.cs.findbugs.ba.bcp.PatternElement
addOrCheckDefinition, allowTrailingEdges, dominatedBy, getDominatedBy, getLabel, getNext, label, lookup, match, setAllowTrailingEdges, setIndex, setNext, toString
-
Constructor Details
-
SingleInstruction
public SingleInstruction()
-
-
Method Details
-
acceptBranch
Description copied from class:PatternElementReturn whether or not it is acceptable to take the given branch.- Specified by:
acceptBranchin classPatternElement- Parameters:
edge- the Edge representing the branchsource- the source instruction of the branch- Returns:
- true if the Edge is acceptable, false if not
-
minOccur
public int minOccur()Description copied from class:PatternElementReturn the minimum number of instructions this PatternElement must match in the ByteCodePattern.- Specified by:
minOccurin classPatternElement
-
maxOccur
public int maxOccur()Description copied from class:PatternElementReturn the maximum number of instructions this PatternElement must match in the ByteCodePattern.- Specified by:
maxOccurin classPatternElement
-