Package org.jboss.byteman.rule
Class Event
- java.lang.Object
-
- org.jboss.byteman.rule.RuleElement
-
- org.jboss.byteman.rule.Event
-
public class Event extends RuleElement
class which represents a rule event comprising of a set of abstract bindings of event variables to evaluable expressions.
-
-
Field Summary
-
Fields inherited from class org.jboss.byteman.rule.RuleElement
rule
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description private void
addBinding(Bindings bindings, ParseNode bindingTree)
void
compile(org.objectweb.asm.MethodVisitor mv, CompileContext compileContext)
static Event
create(Rule rule, java.lang.String text)
static Event
create(Rule rule, ParseNode eventTree)
Binding
createBinding(ParseNode varTree)
private void
createBindings(ParseNode eventTree)
Bindings
getBindings()
private Type
getBindingType(ParseNode typeTree)
create and return a type for a binding or return null if the type cannot be createdjava.lang.Object
interpret(HelperAdapter helper)
private void
typeCheck(Binding binding)
Type
typeCheck(Type expected)
void
writeTo(java.io.StringWriter stringWriter)
-
Methods inherited from class org.jboss.byteman.rule.RuleElement
getTypeGroup, rebox, toString
-
-
-
-
Constructor Detail
-
Event
protected Event(Rule rule, ParseNode eventTree) throws TypeException
- Throws:
TypeException
-
Event
protected Event(Rule rule)
-
-
Method Detail
-
create
public static Event create(Rule rule, ParseNode eventTree) throws TypeException
- Throws:
TypeException
-
create
public static Event create(Rule rule, java.lang.String text) throws ParseException, TypeException
- Throws:
ParseException
TypeException
-
getBindings
public Bindings getBindings()
- Overrides:
getBindings
in classRuleElement
-
typeCheck
public Type typeCheck(Type expected) throws TypeException
- Specified by:
typeCheck
in classRuleElement
- Throws:
TypeException
-
typeCheck
private void typeCheck(Binding binding) throws TypeException
- Throws:
TypeException
-
createBindings
private void createBindings(ParseNode eventTree) throws TypeException
- Throws:
TypeException
-
addBinding
private void addBinding(Bindings bindings, ParseNode bindingTree) throws TypeException
- Throws:
TypeException
-
createBinding
public Binding createBinding(ParseNode varTree) throws TypeException
- Throws:
TypeException
-
getBindingType
private Type getBindingType(ParseNode typeTree)
create and return a type for a binding or return null if the type cannot be created- Parameters:
typeTree
-- Returns:
- the binding type or null
-
interpret
public java.lang.Object interpret(HelperAdapter helper) throws ExecuteException
- Specified by:
interpret
in classRuleElement
- Throws:
ExecuteException
-
compile
public void compile(org.objectweb.asm.MethodVisitor mv, CompileContext compileContext) throws CompileException
- Specified by:
compile
in classRuleElement
- Throws:
CompileException
-
writeTo
public void writeTo(java.io.StringWriter stringWriter)
- Specified by:
writeTo
in classRuleElement
-
-