Class RuleConstructor.MethodClause
- Enclosing class:
RuleConstructor
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionDefining class initialization method as place for rule injection.inClassInitMethod
(String... argTypes) Defining class initialization method as place for rule injection.Defining that the rule will be injected to all sub-classes or classes implementing the interface.Defining constructor, special method type, as place for rule injection.inConstructor
(String... argTypes) Defining constructor, special method type, as place for rule injection.Defining method where the rule is injected to.Defining method specified by argument types where the rule is injected to.
-
Constructor Details
-
MethodClause
public MethodClause()
-
-
Method Details
-
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
.- Returns:
- this, for having fluent api
-
inMethod
Defining method where the rule is injected to.
Example:
new RuleBuilder("rule name")
.onInterface("javax.transaction.xa.XAResource")
.inMethod("commit")
...- Parameters:
methodName
- method name for rule injection- Returns:
- this, for having fluent api
-
inMethod
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")
...- Parameters:
methodName
- method name for rule injectionargTypes
- method argument types to closer specify what method is instrumented- Returns:
- this, for having fluent api
-
inConstructor
Defining constructor, special method type, as place for rule injection.- Returns:
- this, for having fluent api
-
inConstructor
Defining constructor, special method type, as place for rule injection.
The type of constructor method is specified by its arguments.
- Parameters:
argTypes
- method argument types to closer specify which method- Returns:
- this, for having fluent api
-
inClassInitMethod
Defining class initialization method as place for rule injection.- Returns:
- this, for having fluent api
-
inClassInitMethod
Defining class initialization method as place for rule injection.- Parameters:
argTypes
- method argument types to closer specify which method- Returns:
- this, for having fluent api
-