org.jboss.byteman.rule.expression
Class ExpressionHelper

java.lang.Object
  extended by org.jboss.byteman.rule.expression.ExpressionHelper

public class ExpressionHelper
extends java.lang.Object

helper class to transform parsed expression AST into an actual Expression instance


Constructor Summary
ExpressionHelper()
           
 
Method Summary
static AssignableExpression createAssignableExpression(Rule rule, Bindings bindings, ParseNode exprTree, Type type)
           
static Expression createBinaryExpression(Rule rule, Bindings bindings, ParseNode exprTree, Type type)
           
static Expression createCallExpression(Rule rule, Bindings bindings, ParseNode selectorTree, ParseNode recipientTree, ParseNode argTree, Type type)
           
static Expression createExpression(Rule rule, Bindings bindings, ParseNode exprTree)
           
static Expression createExpression(Rule rule, Bindings bindings, ParseNode exprTree, Type type)
           
static java.util.List<Expression> createExpressionList(Rule rule, Bindings bindings, ParseNode exprTree)
           
static java.util.List<Expression> createExpressionList(Rule rule, Bindings bindings, ParseNode exprTree, Type type)
           
static AssignableExpression createFieldExpression(Rule rule, Bindings bindings, ParseNode fieldTree, ParseNode targetTree, Type type)
           
static Expression createNewExpression(Rule rule, Bindings bindings, ParseNode typeNameTree, ParseNode argTree, ParseNode arrayDimsTree)
           
static java.util.List<Expression> createNewExpressionIndexList(Rule rule, Bindings bindings, ParseNode exprTree)
           
static java.lang.String[] createPathList(ParseNode pathTree)
           
static Expression createTernaryExpression(Rule rule, Bindings bindings, ParseNode exprTree, Type type)
           
static Expression createThrowExpression(Rule rule, Bindings bindings, ParseNode typeNameTree, ParseNode argTree)
           
static Expression createUnaryExpression(Rule rule, Bindings bindings, ParseNode exprTree, Type type)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExpressionHelper

public ExpressionHelper()
Method Detail

createExpression

public static Expression createExpression(Rule rule,
                                          Bindings bindings,
                                          ParseNode exprTree)
                                   throws TypeException
Throws:
TypeException

createExpression

public static Expression createExpression(Rule rule,
                                          Bindings bindings,
                                          ParseNode exprTree,
                                          Type type)
                                   throws TypeException
Throws:
TypeException

createFieldExpression

public static AssignableExpression createFieldExpression(Rule rule,
                                                         Bindings bindings,
                                                         ParseNode fieldTree,
                                                         ParseNode targetTree,
                                                         Type type)
                                                  throws TypeException
Throws:
TypeException

createCallExpression

public static Expression createCallExpression(Rule rule,
                                              Bindings bindings,
                                              ParseNode selectorTree,
                                              ParseNode recipientTree,
                                              ParseNode argTree,
                                              Type type)
                                       throws TypeException
Throws:
TypeException

createPathList

public static java.lang.String[] createPathList(ParseNode pathTree)

createThrowExpression

public static Expression createThrowExpression(Rule rule,
                                               Bindings bindings,
                                               ParseNode typeNameTree,
                                               ParseNode argTree)
                                        throws TypeException
Throws:
TypeException

createNewExpression

public static Expression createNewExpression(Rule rule,
                                             Bindings bindings,
                                             ParseNode typeNameTree,
                                             ParseNode argTree,
                                             ParseNode arrayDimsTree)
                                      throws TypeException
Throws:
TypeException

createUnaryExpression

public static Expression createUnaryExpression(Rule rule,
                                               Bindings bindings,
                                               ParseNode exprTree,
                                               Type type)
                                        throws TypeException
Throws:
TypeException

createBinaryExpression

public static Expression createBinaryExpression(Rule rule,
                                                Bindings bindings,
                                                ParseNode exprTree,
                                                Type type)
                                         throws TypeException
Throws:
TypeException

createTernaryExpression

public static Expression createTernaryExpression(Rule rule,
                                                 Bindings bindings,
                                                 ParseNode exprTree,
                                                 Type type)
                                          throws TypeException
Throws:
TypeException

createAssignableExpression

public static AssignableExpression createAssignableExpression(Rule rule,
                                                              Bindings bindings,
                                                              ParseNode exprTree,
                                                              Type type)
                                                       throws TypeException
Throws:
TypeException

createExpressionList

public static java.util.List<Expression> createExpressionList(Rule rule,
                                                              Bindings bindings,
                                                              ParseNode exprTree)
                                                       throws TypeException
Throws:
TypeException

createExpressionList

public static java.util.List<Expression> createExpressionList(Rule rule,
                                                              Bindings bindings,
                                                              ParseNode exprTree,
                                                              Type type)
                                                       throws TypeException
Throws:
TypeException

createNewExpressionIndexList

public static java.util.List<Expression> createNewExpressionIndexList(Rule rule,
                                                                      Bindings bindings,
                                                                      ParseNode exprTree)
                                                               throws TypeException
Throws:
TypeException