| java.lang.Object edu.umd.cs.findbugs.ba.bcp.PatternElement edu.umd.cs.findbugs.ba.bcp.Invoke
Invoke | public class Invoke extends PatternElement (Code) | | A PatternElement to match a method invocation.
Currently, we don't allow variables in this element (for arguments
and return value). This would be a good thing to add.
We also don't distinguish between invokevirtual, invokeinterface,
and invokespecial.
Invoke objects match by class name, method name, method signature,
and mode.
Names and signatures may be matched in several ways:
- By an exact match. This is the default behavior.
- By a regular expression. If the string provided to the Invoke
constructor begins with a "/" character, the rest of the string
is treated as a regular expression.
- As a subclass match. This only applies to class name matches.
If the first character of a class name string is "+", then the
rest of the string is treated as the name of a base class.
Any subclass or subinterface of the named type will be accepted.
The mode specifies what kind of invocations in the Invoke
element matches. It is specified as the bitwise combination of the
following values:
-
INSTANCE , which matches ordinary instance method invocations
-
STATIC , which matches static method invocations
-
CONSTRUCTOR , which matches object constructor invocations
The special mode ORDINARY_METHOD is equivalent to INSTANCE|STATIC .
The special mode ANY is equivalent to INSTANCE|STATIC|CONSTRUCTOR .
author: David Hovemeyer See Also: PatternElement |
Field Summary | |
final public static int | ANY Match both static and instance invocations. | final public static int | CONSTRUCTOR Match object constructor invocations. | final public static int | INSTANCE Match ordinary (non-constructor) instance invocations. | final public static int | ORDINARY_METHOD Match ordinary methods (everything except constructors). | final public static int | STATIC Match static invocations. |
ANY | final public static int ANY(Code) | | Match both static and instance invocations.
|
CONSTRUCTOR | final public static int CONSTRUCTOR(Code) | | Match object constructor invocations.
|
INSTANCE | final public static int INSTANCE(Code) | | Match ordinary (non-constructor) instance invocations.
|
ORDINARY_METHOD | final public static int ORDINARY_METHOD(Code) | | Match ordinary methods (everything except constructors).
|
STATIC | final public static int STATIC(Code) | | Match static invocations.
|
Invoke | public Invoke(String className, String methodName, String methodSig, int mode, RepositoryLookupFailureCallback lookupFailureCallback)(Code) | | Constructor.
Parameters: className - the class name of the method; may be specified exactly,as a regexp, or as a subtype match Parameters: methodName - the name of the method; may be specified exactly or as a regexp Parameters: methodSig - the signature of the method; may be specified exactly or as a regexp Parameters: mode - the mode of invocation |
acceptBranch | public boolean acceptBranch(Edge edge, InstructionHandle source)(Code) | | |
maxOccur | public int maxOccur()(Code) | | |
minOccur | public int minOccur()(Code) | | |
|
|