Class RuleConstructor.ConditionClause

  • Enclosing class:
    RuleConstructor

    public final class RuleConstructor.ConditionClause
    extends java.lang.Object
    • Constructor Detail

      • ConditionClause

        public ConditionClause()
    • Method Detail

      • helper

        public RuleConstructor.ConditionClause helper​(java.lang.Class<?> helperClass)
        Byteman helper class to be used in rule definition.
        Parameters:
        helperClass - byteman helper class
        Returns:
        this, for having fluent api
      • helper

        public RuleConstructor.ConditionClause helper​(java.lang.String helperClassName)
        Class name of Byteman helper class.
        Parameters:
        helperClassName - byteman helper class name
        Returns:
        this, for having fluent api
      • bind

        public RuleConstructor.ConditionClause bind​(java.lang.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()

        Parameters:
        bindClauses - bind clauses to be part of the rule
        Returns:
        this, for having fluent api
      • imports

        public RuleConstructor.ConditionClause imports​(java.lang.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

        Parameters:
        imports - specifying imports clauses which will be added to byteman rule configuration
        Returns:
        this, for having fluent api
      • compile

        public RuleConstructor.ConditionClause compile()

        Defines rule for being compiled.

        Default behaviour is to use the interpreter.

        Returns:
        this, for having fluent api
      • nocompile

        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.

        Returns:
        this, for having fluent api
      • ifCondition

        public RuleConstructor.ActionClause ifCondition​(java.lang.String condition)

        Rule condition when rule will be executed.

        Defined string is directly used in rule definition.

        Rule condition is set as IF <condition>.

        Parameters:
        condition - rule condition string that is used for the rule
        Returns:
        this, for having fluent api
      • ifTrue

        public RuleConstructor.ActionClause ifTrue()

        Condition ensuring that rule will be executed.

        Rule condition is set as IF true.

        Returns:
        this, for having fluent api
      • ifFalse

        public RuleConstructor.ActionClause ifFalse()

        Condition ensuring that rule won't be executed.

        Rule condition is set as IF false.

        Returns:
        this, for having fluent api