public final class RuleConstructor.LocationClause extends Object
Constructor | Description |
---|---|
LocationClause() |
Modifier and Type | Method | Description |
---|---|---|
RuleConstructor.ConditionClause |
after(String after) |
Rule is invoked
AFTER point which is specified with parameter. |
RuleConstructor.ConditionClause |
afterInvoke(String method) |
Rule is invoked after invocation of method within the trigger method.
|
RuleConstructor.ConditionClause |
afterInvoke(String method,
int occurencePosition) |
Rule is invoked after invocation of method within the trigger method
where
occurencePosition defines Nth textual occurrence
of the method invocation. |
RuleConstructor.ConditionClause |
afterRead(String variable) |
Rule is invoked after point where method reads a variable.
|
RuleConstructor.ConditionClause |
afterRead(String variable,
int occurencePosition) |
Rule is invoked after point where method reads a variable where
occurencePosition
defines Nth textual occurrence of the field access. |
RuleConstructor.ConditionClause |
afterSynchronize() |
Rule is invoked after invocation of method within the trigger method.
Location specifier is set as AFTER SYNCHRONIZE . |
RuleConstructor.ConditionClause |
afterSynchronize(int occurencePosition) |
Rule is invoked after invocation of method within the trigger method
where
occurencePosition defines Nth textual occurrence
of the method invocation. |
RuleConstructor.ConditionClause |
afterWrite(String variable) |
Rule is invoked after point where method writes to a variable.
|
RuleConstructor.ConditionClause |
afterWrite(String variable,
int occurencePosition) |
Rule is invoked after point where method writes to a variable where
occurencePosition
defines Nth textual occurrence of the field write. |
RuleConstructor.ConditionClause |
at(String at) |
Rule is invoked
AT 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(String method) |
Rule is invoked at point of invocation of method within the trigger method.
|
RuleConstructor.ConditionClause |
atInvoke(String method,
int occurencePosition) |
Rule is invoked at point of invocation of method within the trigger method
where
occurencePosition defines Nth 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(String variable) |
Rule is invoked at point where method reads a variable.
|
RuleConstructor.ConditionClause |
atRead(String variable,
int occurencePosition) |
Rule is invoked at point where method reads a variable
where
occurencePosition defines Nth
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
where
occurencePosition defines Nth 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(String variable) |
Rule is invoked at point where method writes to a variable.
|
RuleConstructor.ConditionClause |
atWrite(String variable,
int occurencePosition) |
Rule is invoked at point where method writes to a variable where
occurencePosition
defines Nth textual occurrence of the field write. |
RuleConstructor.LocationClause |
helper(Class<?> helperClass) |
Byteman helper class to be used in rule definition.
|
RuleConstructor.LocationClause |
helper(String helperClassName) |
Class name of Byteman helper class.
|
public RuleConstructor.LocationClause helper(Class<?> helperClass)
helperClass
- byteman helper classpublic RuleConstructor.LocationClause helper(String helperClassName)
helperClassName
- byteman helper class namepublic RuleConstructor.ConditionClause atEntry()
Rule is invoked at entry point of method.
Location specifier is set as AT ENTRY
.
public RuleConstructor.ConditionClause atExit()
Rule is invoked at exit point of method.
Location specifier is set as AT EXIT
.
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>
.
line
- line number to be rule injection pointpublic RuleConstructor.ConditionClause atRead(String variable)
Rule is invoked at point where method reads a variable.
Location specifier is set as AT READ <variable>
.
variable
- rule is triggered at write from this variable happenpublic RuleConstructor.ConditionClause atRead(String variable, int occurencePosition)
Rule is invoked at point where method reads a variable
where occurencePosition
defines Nth
textual occurrence of the field access.
Location specifier is set as AT READ <variable> <occurencePosition>
.
variable
- rule is triggered at write from this variable happenoccurencePosition
- Nth textual occurrence of reading the fieldpublic RuleConstructor.ConditionClause afterRead(String variable)
Rule is invoked after point where method reads a variable.
Location specifier is set as AFTER READ <variable>
.
variable
- rule is triggered after write from this variable happenpublic RuleConstructor.ConditionClause afterRead(String variable, int occurencePosition)
Rule is invoked after point where method reads a variable where occurencePosition
defines Nth
textual occurrence of the field access.
Location specifier is set as AFTER READ <variable> <occurencePosition>
.
variable
- rule is triggered after write from this variable happenoccurencePosition
- Nth textual occurrence of reading the fieldpublic RuleConstructor.ConditionClause atWrite(String variable)
Rule is invoked at point where method writes to a variable.
Location specifier is set as AT WRITE <variable>
.
variable
- rule is triggered at write to this variable happenpublic RuleConstructor.ConditionClause atWrite(String variable, int occurencePosition)
Rule is invoked at point where method writes to a variable where occurencePosition
defines Nth
textual occurrence of the field write.
Location specifier is set as AT WRITE <variable> <occurencePosition>
.
variable
- rule is triggered at write to this variable happenoccurencePosition
- Nth textual occurrence of the field writepublic RuleConstructor.ConditionClause afterWrite(String variable)
Rule is invoked after point where method writes to a variable.
Location specifier is set as AFTER WRITE <variable>
.
variable
- rule is triggered after write to this variable happenpublic RuleConstructor.ConditionClause afterWrite(String variable, int occurencePosition)
Rule is invoked after point where method writes to a variable where occurencePosition
defines Nth
textual occurrence of the field write.
Location specifier is set as AFTER WRITE <variable> <occurencePosition>
.
variable
- rule is triggered after write to this variable happenoccurencePosition
- Nth textual occurrence of the field writepublic RuleConstructor.ConditionClause atInvoke(String method)
Rule is invoked at point of invocation of method within the trigger method.
Location specifier is set as AT INVOKE <variable>
.
method
- method name after which invocation the rule is executedpublic RuleConstructor.ConditionClause atInvoke(String method, int occurencePosition)
Rule is invoked at point of invocation of method within the trigger method
where occurencePosition
defines Nth
textual occurrence
of the method invocation.
Location specifier is set as AT INVOKE <variable> <occurencePosition>
.
method
- method name after which invocation the rule is executedoccurencePosition
- Nth textual occurrence of the method invocationpublic RuleConstructor.ConditionClause afterInvoke(String method)
Rule is invoked after invocation of method within the trigger method.
Location specifier is set as AFTER INVOKE <variable>
.
method
- method name after which invocation the rule is executedpublic RuleConstructor.ConditionClause afterInvoke(String method, int occurencePosition)
Rule is invoked after invocation of method within the trigger method
where occurencePosition
defines Nth
textual occurrence
of the method invocation.
Location specifier is set as AFTER INVOKE <variable> <occurencePosition>
.
method
- method name after which invocation the rule is executedoccurencePosition
- Nth textual occurrence of the method invocationpublic RuleConstructor.ConditionClause atSynchronize()
Rule is invoked at entry of synchronization block in the target method.
Location specifier is set as AT SYNCHRONIZE
.
public RuleConstructor.ConditionClause atSynchronize(int occurencePosition)
Rule is invoked at point of invocation of method within the trigger method
where occurencePosition
defines Nth
textual
occurrence of the method invocation.
Location specifier is set as AT SYNCHRONIZE <occurencePosition>
.
occurencePosition
- Nth textual occurrence of the method invocationpublic RuleConstructor.ConditionClause afterSynchronize()
AFTER SYNCHRONIZE
.public RuleConstructor.ConditionClause afterSynchronize(int occurencePosition)
Rule is invoked after invocation of method within the trigger method
where occurencePosition
defines Nth
textual occurrence
of the method invocation.
Location specifier is set as AFTER SYNCHRONIZE <occurencePosition>
.
occurencePosition
- Nth textual occurrence of the method invocationpublic RuleConstructor.ConditionClause atThrow()
Identifies a throw operation within the trigger method.
Location specifier is set as AT THROW
.
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>
.
occurencePosition
- which Nth textual occurrence of a throw triggers the rulepublic 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
.
public RuleConstructor.ConditionClause at(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 as AT LINE 123
.
at
- specifying rule injection point that is enriched
with AT
keywordpublic RuleConstructor.ConditionClause after(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 as AFTER READ $0
.
after
- specifying rule injection point that is enriched
with AFTER
keywordCopyright © 2018. All rights reserved.