public final class RuleConstructor.ConditionClause extends Object
Constructor | Description |
---|---|
ConditionClause() |
Modifier and Type | Method | Description |
---|---|---|
RuleConstructor.ConditionClause |
bind(String... bindClauses) |
Definition of bind clause.
|
RuleConstructor.ConditionClause |
compile() |
Defines rule for being compiled.
|
RuleConstructor.ConditionClause |
helper(Class<?> helperClass) |
Byteman helper class to be used in rule definition.
|
RuleConstructor.ConditionClause |
helper(String helperClassName) |
Class name of Byteman helper class.
|
RuleConstructor.ActionClause |
ifCondition(String condition) |
Rule condition when rule will be executed.
|
RuleConstructor.ActionClause |
ifFalse() |
Condition ensuring that rule won't be executed.
|
RuleConstructor.ActionClause |
ifTrue() |
Condition ensuring that rule will be executed.
|
RuleConstructor.ConditionClause |
imports(String... imports) |
Setting module import definition for the rule.
|
RuleConstructor.ConditionClause |
nocompile() |
Defines rule for not being compiled.
|
public RuleConstructor.ConditionClause helper(Class<?> helperClass)
helperClass
- byteman helper classpublic RuleConstructor.ConditionClause helper(String helperClassName)
helperClassName
- byteman helper class namepublic RuleConstructor.ConditionClause bind(String... bindClauses)
Definition of bind clause.
When called as
bind("engine:CoordinatorEngine = $0", "identifier:String = engine.getId()")
rule looks
BIND bind("engine:CoordinatorEngine = $0";
"identifier:String = engine.getId()
bindClauses
- bind clauses to be part of the rulepublic RuleConstructor.ConditionClause imports(String... imports)
Setting module import definition for the rule.
For module import functionality works you need to use parameter
-javaagent modules:
. The only provided implementation class
which is to manage module imports is
org.jboss.byteman.modules.jbossmodules.JbossModulesSystem
imports
- specifying imports clauses which will be added
to byteman rule configurationpublic RuleConstructor.ConditionClause compile()
Defines rule for being compiled.
Default behaviour is to use the interpreter.
public RuleConstructor.ConditionClause nocompile()
Defines rule for not being compiled.
Default behaviour is to use the interpreter but byteman system property could be used to change the default behaviour for rules being compiled every time then this settings could be useful.
public RuleConstructor.ActionClause ifCondition(String condition)
Rule condition when rule will be executed.
Defined string is directly used in rule definition.
Rule condition is set as IF <condition>
.
condition
- rule condition string that is used for the rulepublic RuleConstructor.ActionClause ifTrue()
Condition ensuring that rule will be executed.
Rule condition is set as IF true
.
public RuleConstructor.ActionClause ifFalse()
Condition ensuring that rule won't be executed.
Rule condition is set as IF false
.
Copyright © 2018. All rights reserved.