public final class Wrapper extends Object
The supported language is best thought of as a subset of Java 1.0.2. The following features from Java 5 and earlier are currently NOT supported:
As much as possible, this class uses standard Java keywords prefixed by "_" as method names. This helps to remember what the method name is for creating an if statement (_if of course). All public methods are static, and using static imports for this class is advisable: simple use
import static org.glassfish.dynamic.codegen.spi.Wrapper.*to get easy access to all of the _xxx methods.
A typical use of this class looks something like:
_clear() ; // clean up any state from previous uses // optional: _setClassLoader(cl) ; // If you need a specific ClassLoader, set it early // so that your generated code can be checked against // those classes that it references. _package( "YYY" ) ; // set the package to use for the generated code _import( "AAA.BBB" ) ; // repeat as needed. As in Java, this makes "BBB" // a synonym for "AAA.BBB". Collisions are not // permitted. _class( ... ) ; // _interface is used for interfaces. _data( ... ) ; // define the class data members (repeat as needed) _initializer() ; // define a static initializer _method( ... ) ; // define a method (use _constructor for a constructor) _arg( ... ) ; // repeat as needed for the method arguments. _body() ; // begin the method body definition. // define the contents of the body using any of the available // statements. _end() ; // of method _end() ; // of class _end() ; // of package Class<?> newClass = _generate( ... ) ;Alternatively, the last line could be
GenericClasswhich makes it easy to create an instance of the generated class by calling:gc = _generate( T.class, props ) ;
T instance = gc.create() ;
Currently only one class can be defined at a time. There is a grammar defined below that gives more detail. One small note: it is necessary to call _expr( expr ) in order to convert expr into a statement that is incorporated into a body. If this call is omitted, the generated code will NOT contain expr, leading to a difficult to find bug. I will probably fix this eventually, and treat all dangling expressions as errors.
This class provides many short utility methods that operate against a current context that is maintained in a ThreadLocal. This removes the bookkeeping that would otherwise be needed to keep track of various internal factories needed for generating statements and expressions. Note that this class is designed to be statically imported.
The point of view of the API of this class is that calls to create expressions are nested, while calls to create statements are not. That is, constructing an expression will often lead to nested method calls, but constructing a statement is done with a sequence of method calls. Note that everything could be done as a single nested method call per class, but this is unnatural and hard to debug in Java (Java is not Lisp, but you could make it look sort of like Lisp if you tried hard enough).
All of the expression methods can be called any place where an expression is valid, which basically means anywhere a statement can be defined. The other methods can only be called if the sequence of method calls is contained in the language defined by the following grammar:
START : _package IMPORTS CLASS _end ; IMPORTS : _import IMPORTS | empty ; CLASS : _class CDECLS _end ; CDECLS : CDECL CDECLS | empty ; CDECL : _data | _initializer STMTS _end | METHOD | CONSTRUCTOR ; METHOD : _method ARGS _body STMTS _end ; CONSTRUCTOR : _constructor ARGS _body STMTS _end ; ARGS : _arg ARGS | empty ; STMTS : STMT STMTS | empty ; STMT : IF | TRY | SWITCH | WHILE | SIMPLE ; IF : _if STMTS _end | _if STMTS _else STMTS _end ; TRY : _try STMTS CATCHES _end | _try STMTS _finally STMTS _end | _try STMTS CATCHES _finally STMTS _end ; CATCHES : _catch STMTS CATCHES | empty ; SWITCH : _switch CASES | _switch CASES _default STMTS _end ; CASES : _case STMTS CASES | empty ; XXX modify this to support multiple case labels per statement list WHILE : _while STMTS _end ; SIMPLE : _assign | _define | _return | _throw | _expr ;
Any method that requires an expression can use any expression so long as all variables references in the expression are still in scope. This means that:
The _classGenerator() method is used here to get the ClassGeneratorImpl, which can then be used in the CodeGenerator API to create source code or byte code directly. Also note that Util.display can be used to dump the contents of the ClassGeneratorImpl for debugging purposes.
For convenience, methods are provided to display the AST (@see _displayAST), generate source code (@see _sourceCode), and generate byteCode (@see _byteCode).
Modifier and Type | Field and Description |
---|---|
static String |
CLASS_GENERATION_DIRECTORY
Set this to enable dumping the generated byte codes to a
class file in the given directory.
|
static String |
DUMP_AFTER_SETUP_VISITOR
Debugging option used to dump the contents of the AST after
the setup visitor runs.
|
static String |
DUMP_CONSTANT_POOL
Causes contents of constant pool to be dumped.
|
static String |
SOURCE_GENERATION_DIRECTORY
Option used to enable generation of source files while
generating bytecode.
|
static String |
TRACE_BYTE_CODE_GENERATION
Debugging option used to trace the byte code generation.
|
static String |
USE_ASM_VERIFIER
Debugging option used to enable the ASM verifier, which can be
helpful for debugging errors in the code generation.
|
Modifier and Type | Method and Description |
---|---|
static Expression |
_add(Expression left,
Expression right)
Create an expression representing the application of the
+ operator to the left and right expressions in the
form (left op right).
|
static Expression |
_and(Expression left,
Expression right)
Create an expression representing the application of the
&& operator to the left and right expressions in the
form (left op right).
|
static Expression |
_arg(Type type,
String name)
Add an argument to the current method.
|
static Type |
_array(Type type)
Return a representation of the array type with the
given component type.
|
static void |
_assign(Expression var,
Expression expr)
Indicates an assignment statement of the form var = expr.
|
static void |
_body()
Indicates the start of the definition of the body of a method.
|
static Type |
_boolean()
Return a representation of the boolean type.
|
static void |
_break()
Indicates a break statement, that should transfer control out of the
nearest enclosing _switch or _while statement.
|
static Type |
_byte()
Return a representation of the byte type.
|
static byte[] |
_byteCode(ClassGenerator cgen,
ClassLoader cl,
Properties options)
Generate byte codes for the ClassGenerator.
|
static byte[] |
_byteCode(ClassLoader cl,
Properties options)
Generate byte codes for the current ClassGenerator.
|
static Expression |
_call(Expression target,
String ident,
Expression... args)
Generate a call to an instance method, using the Java method
overload resolution algorithm to determine the signature.
|
static Expression |
_call(Expression target,
String ident,
List<Expression> args)
Generate a call to an instance method, using the Java method
overload resolution algorithm to determine the signature.
|
static Expression |
_call(Expression target,
String ident,
Signature signature,
Expression... args)
Generate a call to an instance method.
|
static Expression |
_call(Expression target,
String ident,
Signature signature,
List<Expression> args)
Generate a call to an instance method.
|
static Expression |
_call(Type target,
String ident,
Expression... args)
Generate a call to a static method, using the Java method
overload resolution algorithm to determine the signature.
|
static Expression |
_call(Type target,
String ident,
List<Expression> args)
Generate a call to a static method, using the Java method
overload resolution algorithm to determine the signature.
|
static Expression |
_call(Type target,
String ident,
Signature signature,
Expression... args)
Generate a call to a static method.
|
static Expression |
_call(Type target,
String ident,
Signature signature,
List<Expression> args)
Generate a call to a static method.
|
static void |
_case(int value)
Indicate the start of a particular case in a switch
statement.
|
static Expression |
_cast(Type type,
Expression expr)
Create an expression representing the type cast of expr
to type.
|
static Expression |
_catch(Type type,
String name)
Indicate the start of a catch clause in a try statement.
|
static Type |
_char()
Return a representation of the char type.
|
static Type |
_Class()
Return a representation of the java.lang.Class type.
|
static void |
_class(int modifiers,
String name,
Type superClass,
List<Type> impls)
Define a class.
|
static void |
_class(int modifiers,
String name,
Type superClass,
Type... impls)
Define a class.
|
static ClassGenerator |
_classGenerator()
Obtain the ClassGeneratorImpl that is constructed by the Wrapper
methods.
|
static void |
_clear()
Discard the current Class generated by Wrapper calls, so that
another Class may be generated.
|
static Expression |
_const(boolean c)
Return a constant expression representing the
value c.
|
static Expression |
_const(byte c)
Return a constant expression representing the
value c.
|
static Expression |
_const(char c)
Return a constant expression representing the
value c.
|
static Expression |
_const(double c)
Return a constant expression representing the
value c.
|
static Expression |
_const(float c)
Return a constant expression representing the
value c.
|
static Expression |
_const(int c)
Return a constant expression representing the
value c.
|
static Expression |
_const(long c)
Return a constant expression representing the
value c.
|
static Expression |
_const(short c)
Return a constant expression representing the
value c.
|
static Expression |
_const(String c)
Return a constant expression representing the
value c.
|
static Expression |
_const(Type c)
Return a constant expression representing the
value c.
|
static void |
_constructor(int modifiers,
List<Type> exceptions)
Begin defining a constructor in the current class.
|
static void |
_constructor(int modifiers,
Type... exceptions)
Begin defining a constructor in the current class.
|
static Expression |
_data(int modifiers,
Type type,
String name)
Define a data member in a class.
|
static void |
_default()
Indicate the start of the default case in a switch
statement.
|
static Expression |
_define(Type type,
String name,
Expression expr)
Indicates the introduction of a new local variable initialized to
the given expression.
|
static void |
_displayAST(ClassGenerator cg,
PrintStream ps)
Dump the contents of the AST for the current Class defined
by Wrapper calls.
|
static void |
_displayAST(PrintStream ps)
Dump the contents of the AST for the current Class defined
by Wrapper calls.
|
static Expression |
_div(Expression left,
Expression right)
Create an expression representing the application of the
+ operator to the left and right expressions in the
form (left op right).
|
static Type |
_double()
Return a representation of the double type.
|
static void |
_else()
Indicate the start of the false branch of an if statement.
|
static void |
_end()
Terminates the definition of the current statement, method,
constructor, initializer, class, or package.
|
static Expression |
_eq(Expression left,
Expression right)
Create an expression representing the application of the
== operator to the left and right expressions in the
form (left op right).
|
static void |
_expr(Expression expr)
Indicate that expr should be executed as a statement for its
side effects.
|
static Expression |
_field(Expression expr,
String fieldName)
Return an expression used to access a field in an object
given by expr.
|
static Expression |
_field(Type type,
String fieldName)
Return an expression used to access a static data member in
a class given by the type.
|
static void |
_finally()
Indicate the start of a finally clause in a try statement.
|
static Type |
_float()
Return a representation of the float type.
|
static Expression |
_ge(Expression left,
Expression right)
Create an expression representing the application of the
>= operator to the left and right expressions in the
form (left op right).
|
static <T> GenericClass<T> |
_generate(Class<T> cls,
Properties props)
Return a GenericClass instance so that we can easily create an instance
of the generated class.
|
static <T> GenericClass<T> |
_generate(ClassGenerator cg,
Class<T> cls,
Properties props)
Return a GenericClass instance so that we can easily create an instance
of the generated class.
|
static Class<?> |
_generate(ClassGenerator cg,
ClassLoader cl,
ProtectionDomain pd,
Properties props)
Generate a class for the current ClassGenerator.
|
static Class<?> |
_generate(ClassGenerator cg,
ClassLoader cl,
ProtectionDomain pd,
Properties props,
PrintStream debugOutput)
Generate a class for the ClassGenerator.
|
static Class<?> |
_generate(ClassLoader cl,
ProtectionDomain pd,
Properties props)
Generate a class for the current ClassGenerator.
|
static Class<?> |
_generate(ClassLoader cl,
ProtectionDomain pd,
Properties props,
PrintStream debugOutput)
Generate a class for the current ClassGenerator.
|
static Expression |
_gt(Expression left,
Expression right)
Create an expression representing the application of the
> operator to the left and right expressions in the
form (left op right).
|
static void |
_if(Expression expr)
Indicate the start of an if statement with the given expression
as the condition.
|
static ImportList |
_import()
Return an ImportList that can be shared across multiple
class generations.
|
static void |
_import(ImportList ilist)
Set the ImportList for the current class generation.
|
static Type |
_import(String name)
Used to create short names for types.
|
static Expression |
_index(Expression expr,
Expression index)
Return an expression used to access an element in an array
given by expr.
|
static void |
_initializer() |
static Expression |
_instanceof(Expression expr,
Type type)
Create an expression representing the instanceof test of
expr and type (expr instanceof type).
|
static Type |
_int()
Return a representation of the int type.
|
static void |
_interface(int modifiers,
String name,
List<Type> impls)
Define an interface.
|
static void |
_interface(int modifiers,
String name,
Type... impls)
Define an interface.
|
static Expression |
_le(Expression left,
Expression right)
Create an expression representing the application of the
<= operator to the left and right expressions in the
form (left op right).
|
static Expression |
_length(Expression expr)
Return an expression that gets the length of expr.
|
static Type |
_long()
Return a representation of the long type.
|
static Expression |
_lt(Expression left,
Expression right)
Create an expression representing the application of the
< operator to the left and right expressions in the
form (left op right).
|
static Class<?> |
_makeClass(byte[] data,
String name,
ClassLoader cl,
ProtectionDomain pd)
Convert an array of bytes into a Class using the given
ClassLoader and ProtectionDomain.
|
static void |
_method(int modifiers,
Type type,
String name,
List<Type> exceptions)
Begin defining a method in the current class.
|
static void |
_method(int modifiers,
Type type,
String name,
Type... exceptions)
Begin defining a method in the current class.
|
static Expression |
_mul(Expression left,
Expression right)
Create an expression representing the application of the
+ operator to the left and right expressions in the
form (left op right).
|
static Expression |
_ne(Expression left,
Expression right)
Create an expression representing the application of the
!= operator to the left and right expressions in the
form (left op right).
|
static Expression |
_new_array_init(Type type,
Expression... args)
Create an expression representing the construction of a
new array with the given component type using the given
expressions to initialize the array.
|
static Expression |
_new_array_init(Type type,
List<Expression> args)
Create an expression representing the construction of a
new array with the given component type using the given
expressions to initialize the array.
|
static Expression |
_new_array(Type type,
Expression size)
Create an expression representing the construction of a
new array of the given size with the given component type.
|
static Expression |
_new(Type type,
Expression... args)
Create an expression representing the construction of a
new instance of the given type using the constructor with the
signature determined by the Java method overload resolution
algorithm and the list of expressions as arguments.
|
static Expression |
_new(Type type,
List<Expression> args)
Create an expression representing the construction of a
new instance of the given type using the constructor with the
signature determined by the Java method overload resolution
algorithm and the list of expressions as arguments.
|
static Expression |
_new(Type type,
Signature signature,
Expression... args)
Create an expression representing the construction of a
new instance of the given type using the constructor with the
given signature and the list of expressions as arguments.
|
static Expression |
_new(Type type,
Signature signature,
List<Expression> args)
Create an expression representing the construction of a
new instance of the given type using the constructor with the
given signature and the list of expressions as arguments.
|
static Expression |
_not(Expression expr) |
static Expression |
_null()
Return the null expression.
|
static Type |
_nullType()
Return a representation of the null type.
|
static Type |
_Object()
Return a representation of the java.lang.Object type.
|
static Expression |
_or(Expression left,
Expression right)
Create an expression representing the application of the
|| operator to the left and right expressions in the
form (left op right).
|
static void |
_package()
Same as _package( "" ).
|
static void |
_package(String name)
_package must be called first to set the package name for this
class.
|
static Expression |
_rem(Expression left,
Expression right)
Create an expression representing the application of the
+ operator to the left and right expressions in the
form (left op right).
|
static void |
_return()
Indicates the end of execution in a method.
|
static void |
_return(Expression expr)
Indicates the end of execution in a method with a return of the
value of the expression.
|
static Signature |
_s(Type rtype,
List<Type> types)
Create a signature that may be used for calling a method or
constructor.
|
static Signature |
_s(Type rtype,
Type... types)
Create a signature that may be used for calling a method or
constructor.
|
static void |
_setClassLoader(ClassLoader cl)
Set the ClassLoader for this thread that will be used for validating
references to pre-existing classes from generated code.
|
static Type |
_short()
Return a representation of the short type.
|
static void |
_sourceCode(ClassGenerator cg,
PrintStream ps,
Properties options)
Generate the Java source code for the ClassGenerator.
|
static void |
_sourceCode(ClassGenerator cg,
Properties options)
Generate source code into a specified output directory.
|
static void |
_sourceCode(PrintStream ps,
Properties options)
Generate the Java source code for the current Class defined by
Wrapper calls.
|
static void |
_sourceCode(Properties options)
Generate source code into a specified output directory.
|
static Type |
_String()
Return a representation of the java.lang.String type.
|
static Expression |
_sub(Expression left,
Expression right)
Create an expression representing the application of the
+ operator to the left and right expressions in the
form (left op right).
|
static Expression |
_super(Expression... exprs)
Invoke a superclass constructor as the first statement
in a constructor for a class using the Java method overload
resolution algorithm to determine the signature.
|
static Expression |
_super(List<Expression> exprs)
Invoke a superclass constructor as the first statement
in a constructor for a class using the Java method overload
resolution algorithm to determine the signature.
|
static Expression |
_super(Signature signature,
Expression... exprs)
Invoke a superclass constructor as the first statement
in a constructor for a class.
|
static Expression |
_super(Signature signature,
List<Expression> exprs)
Invoke a superclass constructor as the first statement
in a constructor for a class.
|
static Expression |
_super(String ident,
Expression... exprs)
Generate a call to an instance method in the current super
class using the Java method overload resolution algorithm to
determine the signature.
|
static Expression |
_super(String ident,
List<Expression> exprs)
Generate a call to an instance method in the current super
class using the Java method overload resolution algorithm to
determine the signature.
|
static Expression |
_super(String ident,
Signature signature,
Expression... exprs)
Generate a call to an instance method in the current super
class.
|
static Expression |
_super(String ident,
Signature signature,
List<Expression> exprs)
Generate a call to an instance method in the current super
class.
|
static void |
_switch(Expression expr)
Indicate the start of a switch statement with the given
expression at the switch expression.
|
static Type |
_t(String name)
Return the reference type for the given class name.
|
static Expression |
_this()
Return an expression representing "this".
|
static Expression |
_this(Expression... exprs)
Invoke another constructor as the first statement
in a constructor for a class using the Java method overload
resolution algorithm to determine the signature.
|
static Expression |
_this(List<Expression> exprs)
Invoke another constructor as the first statement
in a constructor for a class using the Java method overload
resolution algorithm to determine the signature.
|
static Expression |
_this(Signature signature,
Expression... exprs)
Invoke another constructor as the first statement
in a constructor for a class.
|
static Expression |
_this(Signature signature,
List<Expression> exprs)
Invoke another constructor as the first statement
in a constructor for a class.
|
static Type |
_thisClass()
Return the type of the current class.
|
static void |
_throw(Expression expr)
Indicates a throw statement that throws the given expression.
|
static void |
_try()
Indicate the start of a try statement.
|
static Expression |
_v(String name)
Construct the expression that refers to
the variable named name.
|
static Type |
_void()
Return a representation of the void type.
|
static void |
_while(Expression expr)
Indicate the start of a while loop with the given
expression as its condition.
|
static Pair<String,String> |
splitClassName(String name)
Split the class name into a pair of the package name and the unqualified class
name.
|
public static final String CLASS_GENERATION_DIRECTORY
public static final String SOURCE_GENERATION_DIRECTORY
public static final String DUMP_AFTER_SETUP_VISITOR
public static final String TRACE_BYTE_CODE_GENERATION
public static final String DUMP_CONSTANT_POOL
public static final String USE_ASM_VERIFIER
public static ClassGenerator _classGenerator()
public static void _setClassLoader(ClassLoader cl)
public static byte[] _byteCode(ClassLoader cl, Properties options)
public static byte[] _byteCode(ClassGenerator cgen, ClassLoader cl, Properties options)
public static Class<?> _makeClass(byte[] data, String name, ClassLoader cl, ProtectionDomain pd)
public static Class<?> _generate(ClassLoader cl, ProtectionDomain pd, Properties props, PrintStream debugOutput)
public static Class<?> _generate(ClassGenerator cg, ClassLoader cl, ProtectionDomain pd, Properties props, PrintStream debugOutput)
public static Class<?> _generate(ClassLoader cl, ProtectionDomain pd, Properties props)
public static Class<?> _generate(ClassGenerator cg, ClassLoader cl, ProtectionDomain pd, Properties props)
public static <T> GenericClass<T> _generate(Class<T> cls, Properties props) throws ClassNotFoundException
ClassNotFoundException
public static <T> GenericClass<T> _generate(ClassGenerator cg, Class<T> cls, Properties props) throws ClassNotFoundException
ClassNotFoundException
public static void _sourceCode(PrintStream ps, Properties options) throws IOException
IOException
public static void _sourceCode(ClassGenerator cg, PrintStream ps, Properties options) throws IOException
IOException
public static void _sourceCode(Properties options) throws IOException
IOException
public static void _sourceCode(ClassGenerator cg, Properties options) throws IOException
IOException
public static void _displayAST(PrintStream ps)
public static void _displayAST(ClassGenerator cg, PrintStream ps)
public static void _clear()
public static Signature _s(Type rtype, Type... types)
public static Signature _s(Type rtype, List<Type> types)
public static final Type _t(String name)
public static final Type _void()
public static final Type _nullType()
public static final Type _boolean()
public static final Type _byte()
public static final Type _short()
public static final Type _char()
public static final Type _int()
public static final Type _long()
public static final Type _float()
public static final Type _double()
public static final Type _Object()
public static final Type _String()
public static final Type _Class()
public static final Type _array(Type type)
public static final Pair<String,String> splitClassName(String name)
public static final void _package(String name)
public static final void _package()
public static final Type _import(String name)
public static final ImportList _import()
public static final void _import(ImportList ilist)
public static final void _class(int modifiers, String name, Type superClass, Type... impls)
public static final void _class(int modifiers, String name, Type superClass, List<Type> impls)
public static final void _interface(int modifiers, String name, Type... impls)
public static final void _interface(int modifiers, String name, List<Type> impls)
public static final Expression _data(int modifiers, Type type, String name)
public static final void _initializer()
public static final void _method(int modifiers, Type type, String name, Type... exceptions)
public static final void _method(int modifiers, Type type, String name, List<Type> exceptions)
public static final void _constructor(int modifiers, Type... exceptions)
public static final void _constructor(int modifiers, List<Type> exceptions)
public static final Expression _arg(Type type, String name)
public static final void _body()
public static final void _end()
public static final void _expr(Expression expr)
public static final void _assign(Expression var, Expression expr)
public static final Expression _define(Type type, String name, Expression expr)
public static final void _break()
public static final void _return()
public static final void _return(Expression expr)
public static final void _throw(Expression expr)
public static final void _if(Expression expr)
public static final void _else()
public static final void _try()
public static final Expression _catch(Type type, String name)
public static final void _finally()
public static final void _switch(Expression expr)
public static final void _case(int value)
public static final void _default()
public static final void _while(Expression expr)
public static final Expression _v(String name)
public static final Expression _null()
public static final Expression _const(boolean c)
public static final Expression _const(char c)
public static final Expression _const(byte c)
public static final Expression _const(short c)
public static final Expression _const(int c)
public static final Expression _const(long c)
public static final Expression _const(float c)
public static final Expression _const(double c)
public static final Expression _const(String c)
public static final Expression _const(Type c)
public static final Expression _call(Expression target, String ident, Signature signature, Expression... args)
public static final Expression _call(Expression target, String ident, Signature signature, List<Expression> args)
public static final Expression _call(Expression target, String ident, Expression... args)
public static final Expression _call(Expression target, String ident, List<Expression> args)
public static final Expression _call(Type target, String ident, Signature signature, Expression... args)
public static final Expression _call(Type target, String ident, Signature signature, List<Expression> args)
public static final Expression _call(Type target, String ident, Expression... args)
public static final Expression _call(Type target, String ident, List<Expression> args)
public static final Expression _super(String ident, Signature signature, Expression... exprs)
public static final Expression _super(String ident, Signature signature, List<Expression> exprs)
public static final Expression _super(String ident, Expression... exprs)
public static final Expression _super(String ident, List<Expression> exprs)
public static final Expression _super(Signature signature, Expression... exprs)
public static final Expression _super(Signature signature, List<Expression> exprs)
public static final Expression _super(List<Expression> exprs)
public static final Expression _super(Expression... exprs)
public static final Expression _this(Signature signature, Expression... exprs)
public static final Expression _this(Signature signature, List<Expression> exprs)
public static final Expression _this(Expression... exprs)
public static final Expression _this(List<Expression> exprs)
public static final Expression _not(Expression expr)
public static final Expression _add(Expression left, Expression right)
public static final Expression _sub(Expression left, Expression right)
public static final Expression _mul(Expression left, Expression right)
public static final Expression _div(Expression left, Expression right)
public static final Expression _rem(Expression left, Expression right)
public static final Expression _lt(Expression left, Expression right)
public static final Expression _gt(Expression left, Expression right)
public static final Expression _le(Expression left, Expression right)
public static final Expression _ge(Expression left, Expression right)
public static final Expression _eq(Expression left, Expression right)
public static final Expression _ne(Expression left, Expression right)
public static final Expression _and(Expression left, Expression right)
public static final Expression _or(Expression left, Expression right)
public static final Expression _cast(Type type, Expression expr)
public static final Expression _instanceof(Expression expr, Type type)
public static final Expression _new(Type type, Signature signature, Expression... args)
public static final Expression _new(Type type, Signature signature, List<Expression> args)
public static final Expression _new(Type type, Expression... args)
public static final Expression _new(Type type, List<Expression> args)
public static final Expression _new_array_init(Type type, Expression... args)
public static final Expression _new_array_init(Type type, List<Expression> args)
public static final Expression _new_array(Type type, Expression size)
public static final Type _thisClass()
public static final Expression _this()
public static final Expression _field(Expression expr, String fieldName)
public static final Expression _field(Type type, String fieldName)
public static final Expression _index(Expression expr, Expression index)
public static final Expression _length(Expression expr)
Copyright © 2017 Oracle. All rights reserved.