Class RuleConstructor.LocationClause
- java.lang.Object
-
- org.jboss.byteman.contrib.dtest.RuleConstructor.LocationClause
-
- Enclosing class:
- RuleConstructor
public final class RuleConstructor.LocationClause extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description LocationClause()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RuleConstructor.ConditionClause
after(java.lang.String after)
Rule is invokedAFTER
point which is specified with parameter.RuleConstructor.ConditionClause
afterInvoke(java.lang.String method)
Rule is invoked after invocation of method within the trigger method.RuleConstructor.ConditionClause
afterInvoke(java.lang.String method, int occurencePosition)
Rule is invoked after invocation of method within the trigger method whereoccurencePosition
definesNth
textual occurrence of the method invocation.RuleConstructor.ConditionClause
afterRead(java.lang.String variable)
Rule is invoked after point where method reads a variable.RuleConstructor.ConditionClause
afterRead(java.lang.String variable, int occurencePosition)
Rule is invoked after point where method reads a variable whereoccurencePosition
definesNth
textual occurrence of the field access.RuleConstructor.ConditionClause
afterSynchronize()
Rule is invoked after invocation of method within the trigger method.
Location specifier is set asAFTER SYNCHRONIZE
.RuleConstructor.ConditionClause
afterSynchronize(int occurencePosition)
Rule is invoked after invocation of method within the trigger method whereoccurencePosition
definesNth
textual occurrence of the method invocation.RuleConstructor.ConditionClause
afterWrite(java.lang.String variable)
Rule is invoked after point where method writes to a variable.RuleConstructor.ConditionClause
afterWrite(java.lang.String variable, int occurencePosition)
Rule is invoked after point where method writes to a variable whereoccurencePosition
definesNth
textual occurrence of the field write.RuleConstructor.ConditionClause
at(java.lang.String at)
Rule is invokedAT
point which is specified with parameter.RuleConstructor.ConditionClause
atEntry()
Rule is invoked at entry point of method.RuleConstructor.ConditionClause
atExceptionExit()
Identifies the point where a method returns control back to its caller via unhandled exceptional control flow.RuleConstructor.ConditionClause
atExit()
Rule is invoked at exit point of method.RuleConstructor.ConditionClause
atInvoke(java.lang.String method)
Rule is invoked at point of invocation of method within the trigger method.RuleConstructor.ConditionClause
atInvoke(java.lang.String method, int occurencePosition)
Rule is invoked at point of invocation of method within the trigger method whereoccurencePosition
definesNth
textual occurrence of the method invocation.RuleConstructor.ConditionClause
atLine(int line)
Rule is invoked at specific line of code within the method.RuleConstructor.ConditionClause
atRead(java.lang.String variable)
Rule is invoked at point where method reads a variable.RuleConstructor.ConditionClause
atRead(java.lang.String variable, int occurencePosition)
Rule is invoked at point where method reads a variable whereoccurencePosition
definesNth
textual occurrence of the field access.RuleConstructor.ConditionClause
atSynchronize()
Rule is invoked at entry of synchronization block in the target method.RuleConstructor.ConditionClause
atSynchronize(int occurencePosition)
Rule is invoked at point of invocation of method within the trigger method whereoccurencePosition
definesNth
textual occurrence of the method invocation.RuleConstructor.ConditionClause
atThrow()
Identifies a throw operation within the trigger method.RuleConstructor.ConditionClause
atThrow(int occurencePosition)
Identifies a throw operation within the trigger method, specified with count as Nth textual occurrence of a throw inside of the method defining only that occurrence to trigger execution of the rule.RuleConstructor.ConditionClause
atWrite(java.lang.String variable)
Rule is invoked at point where method writes to a variable.RuleConstructor.ConditionClause
atWrite(java.lang.String variable, int occurencePosition)
Rule is invoked at point where method writes to a variable whereoccurencePosition
definesNth
textual occurrence of the field write.RuleConstructor.LocationClause
helper(java.lang.Class<?> helperClass)
Byteman helper class to be used in rule definition.RuleConstructor.LocationClause
helper(java.lang.String helperClassName)
Class name of Byteman helper class.(package private) RuleConstructor.ConditionClause
where(java.lang.String where)
Location specifier definition.
-
-
-
Method Detail
-
helper
public RuleConstructor.LocationClause 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.LocationClause helper(java.lang.String helperClassName)
Class name of Byteman helper class.- Parameters:
helperClassName
- byteman helper class name- Returns:
- this, for having fluent api
-
atEntry
public RuleConstructor.ConditionClause atEntry()
Rule is invoked at entry point of method.
Location specifier is set as
AT ENTRY
.- Returns:
- this, for having fluent api
-
atExit
public RuleConstructor.ConditionClause atExit()
Rule is invoked at exit point of method.
Location specifier is set as
AT EXIT
.- Returns:
- this, for having fluent api
-
atLine
public RuleConstructor.ConditionClause atLine(int line)
Rule is invoked at specific line of code within the method.
Location specifier is set as
AT LINE <line>
.- Parameters:
line
- line number to be rule injection point- Returns:
- this, for having fluent api
-
atRead
public RuleConstructor.ConditionClause atRead(java.lang.String variable)
Rule is invoked at point where method reads a variable.
Location specifier is set as
AT READ <variable>
.- Parameters:
variable
- rule is triggered at write from this variable happen- Returns:
- this, for having fluent api
-
atRead
public RuleConstructor.ConditionClause atRead(java.lang.String variable, int occurencePosition)
Rule is invoked at point where method reads a variable where
occurencePosition
definesNth
textual occurrence of the field access.Location specifier is set as
AT READ <variable> <occurencePosition>
.- Parameters:
variable
- rule is triggered at write from this variable happenoccurencePosition
- Nth textual occurrence of reading the field- Returns:
- this, for having fluent api
-
afterRead
public RuleConstructor.ConditionClause afterRead(java.lang.String variable)
Rule is invoked after point where method reads a variable.
Location specifier is set as
AFTER READ <variable>
.- Parameters:
variable
- rule is triggered after write from this variable happen- Returns:
- this, for having fluent api
-
afterRead
public RuleConstructor.ConditionClause afterRead(java.lang.String variable, int occurencePosition)
Rule is invoked after point where method reads a variable where
occurencePosition
definesNth
textual occurrence of the field access.Location specifier is set as
AFTER READ <variable> <occurencePosition>
.- Parameters:
variable
- rule is triggered after write from this variable happenoccurencePosition
- Nth textual occurrence of reading the field- Returns:
- this, for having fluent api
-
atWrite
public RuleConstructor.ConditionClause atWrite(java.lang.String variable)
Rule is invoked at point where method writes to a variable.
Location specifier is set as
AT WRITE <variable>
.- Parameters:
variable
- rule is triggered at write to this variable happen- Returns:
- this, for having fluent api
-
atWrite
public RuleConstructor.ConditionClause atWrite(java.lang.String variable, int occurencePosition)
Rule is invoked at point where method writes to a variable where
occurencePosition
definesNth
textual occurrence of the field write.Location specifier is set as
AT WRITE <variable> <occurencePosition>
.- Parameters:
variable
- rule is triggered at write to this variable happenoccurencePosition
- Nth textual occurrence of the field write- Returns:
- this, for having fluent api
-
afterWrite
public RuleConstructor.ConditionClause afterWrite(java.lang.String variable)
Rule is invoked after point where method writes to a variable.
Location specifier is set as
AFTER WRITE <variable>
.- Parameters:
variable
- rule is triggered after write to this variable happen- Returns:
- this, for having fluent api
-
afterWrite
public RuleConstructor.ConditionClause afterWrite(java.lang.String variable, int occurencePosition)
Rule is invoked after point where method writes to a variable where
occurencePosition
definesNth
textual occurrence of the field write.Location specifier is set as
AFTER WRITE <variable> <occurencePosition>
.- Parameters:
variable
- rule is triggered after write to this variable happenoccurencePosition
- Nth textual occurrence of the field write- Returns:
- this, for having fluent api
-
atInvoke
public RuleConstructor.ConditionClause atInvoke(java.lang.String method)
Rule is invoked at point of invocation of method within the trigger method.
Location specifier is set as
AT INVOKE <variable>
.- Parameters:
method
- method name after which invocation the rule is executed- Returns:
- this, for having fluent api
-
atInvoke
public RuleConstructor.ConditionClause atInvoke(java.lang.String method, int occurencePosition)
Rule is invoked at point of invocation of method within the trigger method where
occurencePosition
definesNth
textual occurrence of the method invocation.Location specifier is set as
AT INVOKE <variable> <occurencePosition>
.- Parameters:
method
- method name after which invocation the rule is executedoccurencePosition
- Nth textual occurrence of the method invocation- Returns:
- this, for having fluent api
-
afterInvoke
public RuleConstructor.ConditionClause afterInvoke(java.lang.String method)
Rule is invoked after invocation of method within the trigger method.
Location specifier is set as
AFTER INVOKE <variable>
.- Parameters:
method
- method name after which invocation the rule is executed- Returns:
- this, for having fluent api
-
afterInvoke
public RuleConstructor.ConditionClause afterInvoke(java.lang.String method, int occurencePosition)
Rule is invoked after invocation of method within the trigger method where
occurencePosition
definesNth
textual occurrence of the method invocation.Location specifier is set as
AFTER INVOKE <variable> <occurencePosition>
.- Parameters:
method
- method name after which invocation the rule is executedoccurencePosition
- Nth textual occurrence of the method invocation- Returns:
- this, for having fluent api
-
atSynchronize
public RuleConstructor.ConditionClause atSynchronize()
Rule is invoked at entry of synchronization block in the target method.
Location specifier is set as
AT SYNCHRONIZE
.- Returns:
- this, for having fluent api
-
atSynchronize
public RuleConstructor.ConditionClause atSynchronize(int occurencePosition)
Rule is invoked at point of invocation of method within the trigger method where
occurencePosition
definesNth
textual occurrence of the method invocation.Location specifier is set as
AT SYNCHRONIZE <occurencePosition>
.- Parameters:
occurencePosition
- Nth textual occurrence of the method invocation- Returns:
- this, for having fluent api
-
afterSynchronize
public RuleConstructor.ConditionClause afterSynchronize()
Rule is invoked after invocation of method within the trigger method.
Location specifier is set asAFTER SYNCHRONIZE
.- Returns:
- this, for having fluent api
-
afterSynchronize
public RuleConstructor.ConditionClause afterSynchronize(int occurencePosition)
Rule is invoked after invocation of method within the trigger method where
occurencePosition
definesNth
textual occurrence of the method invocation.Location specifier is set as
AFTER SYNCHRONIZE <occurencePosition>
.- Parameters:
occurencePosition
- Nth textual occurrence of the method invocation- Returns:
- this, for having fluent api
-
atThrow
public RuleConstructor.ConditionClause atThrow()
Identifies a throw operation within the trigger method.
Location specifier is set as
AT THROW
.- Returns:
- this, for having fluent api
-
atThrow
public RuleConstructor.ConditionClause atThrow(int occurencePosition)
Identifies a throw operation within the trigger method, specified with count as Nth textual occurrence of a throw inside of the method defining only that occurrence to trigger execution of the rule.
Location specifier is set as
AT THROW <occurencePosition>
.- Parameters:
occurencePosition
- which Nth textual occurrence of a throw triggers the rule- Returns:
- this, for having fluent api
-
atExceptionExit
public RuleConstructor.ConditionClause atExceptionExit()
Identifies the point where a method returns control back to its caller via unhandled exceptional control flow.
Location specifier is set as
AT EXCEPTION EXIT
.- Returns:
- this, for having fluent api
-
at
public RuleConstructor.ConditionClause at(java.lang.String at)
Rule is invoked
AT
point which is specified with parameter.Location specifier is predefined with
AT
keyword and the rest is up to parameter you provide.When you provide
LINE 123
as parameter the location specifier is set asAT LINE 123
.- Parameters:
at
- specifying rule injection point that is enriched withAT
keyword- Returns:
- this, for having fluent api
-
after
public RuleConstructor.ConditionClause after(java.lang.String after)
Rule is invoked
AFTER
point which is specified with parameter.Location specifier is predefined with
AFTER
keyword and the rest is up to parameter you provide.When you provide
READ $0
as parameter the location specifier is set asAFTER READ $0
.- Parameters:
after
- specifying rule injection point that is enriched withAFTER
keyword- Returns:
- this, for having fluent api
-
where
RuleConstructor.ConditionClause where(java.lang.String where)
Location specifier definition.
Defined string is directly used in rule definition.
The parameter is expected to be defined as whole location specifier. For example when you provide
AT LINE 123
as parameter the location specifier is set asAT LINE 123
.- Parameters:
where
- location specifier- Returns:
- this, for having fluent api
-
-