public final class RuleConstructor.MethodClause extends Object
Constructor | Description |
---|---|
MethodClause() |
Modifier and Type | Method | Description |
---|---|---|
RuleConstructor.LocationClause |
inClassInitMethod() |
Defining class initialization method as place for rule injection.
|
RuleConstructor.LocationClause |
inClassInitMethod(String... argTypes) |
Defining class initialization method as place for rule injection.
|
RuleConstructor.MethodClause |
includeSubclases() |
Defining that the rule will be injected to all sub-classes
or classes implementing the interface.
|
RuleConstructor.LocationClause |
inConstructor() |
Defining constructor, special method type,
as place for rule injection.
|
RuleConstructor.LocationClause |
inConstructor(String... argTypes) |
Defining constructor, special method type,
as place for rule injection.
|
RuleConstructor.LocationClause |
inMethod(String methodName) |
Defining method where the rule is injected to.
|
RuleConstructor.LocationClause |
inMethod(String methodName,
String... argTypes) |
Defining method specified by argument types where the rule is injected to.
|
public RuleConstructor.MethodClause includeSubclases()
Defining that the rule will be injected to all sub-classes or classes implementing the interface.
By default Byteman
injects the rule only to the specified
class and children classes are not instrumented.
The rule class definition is enriched with ^
.
As example: CLASS ^org.jboss.byteman.ExampleClass
.
public RuleConstructor.LocationClause inMethod(String methodName)
Defining method where the rule is injected to.
Example:
new RuleBuilder("rule name")
.onInterface("javax.transaction.xa.XAResource")
.inMethod("commit")
...
methodName
- method name for rule injectionpublic RuleConstructor.LocationClause inMethod(String methodName, String... argTypes)
Defining method specified by argument types where the rule is injected to. Arguments restrict which methods are instrumented based on parameters definition.
Example:
new RuleBuilder("rule name")
.onInterface("javax.transaction.xa.XAResource")
.inMethod("commit", "Xid" , "boolean")
...
methodName
- method name for rule injectionargTypes
- method argument types to closer specify what method is instrumentedpublic RuleConstructor.LocationClause inConstructor()
public RuleConstructor.LocationClause inConstructor(String... argTypes)
Defining constructor, special method type, as place for rule injection.
The type of constructor method is specified by its arguments.
argTypes
- method argument types to closer specify which methodpublic RuleConstructor.LocationClause inClassInitMethod()
public RuleConstructor.LocationClause inClassInitMethod(String... argTypes)
argTypes
- method argument types to closer specify which methodCopyright © 2018. All rights reserved.