com.sun.codemodel
Class JExpr

java.lang.Object  extended by com.sun.codemodel.JExpr

public abstract class JExpr
extends Object

Factory methods that generate various JExpressions.


Field Summary
static JExpressionFALSE
          Boolean constant that represents false
static JExpressionTRUE
          Boolean constant that represents true
 
Method Summary
static JInvocation_new(JClass c)
           
static JInvocation_new(JType t)
           
static JExpression_null()
           
static JExpression_super()
          Returns a reference to "super", an implicit reference to the super class.
static JExpression_this()
          Returns a reference to "this", an implicit reference to the current object.
static JExpressionassign(JAssignmentTarget lhs, JExpression rhs)
           
static JExpressionassignPlus(JAssignmentTarget lhs, JExpression rhs)
           
static com.sun.codemodel.JCastcast(JType type, JExpression expr)
           
static com.sun.codemodel.JArrayCompRefcomponent(JExpression lhs, JExpression index)
           
static JExpressiondirect(String source)
          Creates an expression directly from a source code fragment.
static JExpressiondotclass(JClass cl)
           
static JInvocationinvoke(JExpression lhs, JMethod method)
           
static JInvocationinvoke(JExpression lhs, String method)
           
static JInvocationinvoke(JMethod method)
           
static JInvocationinvoke(String method)
           
static JExpressionlit(boolean b)
           
static JExpressionlit(char c)
           
static JExpressionlit(double d)
           
static JExpressionlit(float f)
           
static JExpressionlit(int n)
           
static JExpressionlit(long n)
           
static JExpressionlit(String s)
           
static JArraynewArray(JType type)
           
static JArraynewArray(JType type, int size)
          Generates new T[size].
static JArraynewArray(JType type, JExpression size)
          Generates new T[size].
static Stringquotify(char quote, String s)
          Escapes the given string, then surrounds it by the specified quotation mark.
static JFieldRefref(JExpression lhs, JVar field)
           
static JFieldRefref(JExpression lhs, String field)
           
static JFieldRefref(String field)
           
static JFieldRefrefthis(String field)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRUE

public static final JExpression TRUE
Boolean constant that represents true


FALSE

public static final JExpression FALSE
Boolean constant that represents false

Method Detail

assign

public static JExpression assign(JAssignmentTarget lhs,                                 JExpression rhs)

assignPlus

public static JExpression assignPlus(JAssignmentTarget lhs,                                     JExpression rhs)

_new

public static JInvocation _new(JClass c)

_new

public static JInvocation _new(JType t)

invoke

public static JInvocation invoke(String method)

invoke

public static JInvocation invoke(JMethod method)

invoke

public static JInvocation invoke(JExpression lhs,                                 JMethod method)

invoke

public static JInvocation invoke(JExpression lhs,                                 String method)

ref

public static JFieldRef ref(String field)

ref

public static JFieldRef ref(JExpression lhs,                            JVar field)

ref

public static JFieldRef ref(JExpression lhs,                            String field)

refthis

public static JFieldRef refthis(String field)

dotclass

public static JExpression dotclass(JClass cl)

component

public static com.sun.codemodel.JArrayCompRef component(JExpression lhs,                                                        JExpression index)

cast

public static com.sun.codemodel.JCast cast(JType type,                                           JExpression expr)

newArray

public static JArray newArray(JType type)

newArray

public static JArray newArray(JType type,                              JExpression size)
Generates new T[size].

Parameters:
type - The type of the array component. 'T' or new T[size].

newArray

public static JArray newArray(JType type,                              int size)
Generates new T[size].

Parameters:
type - The type of the array component. 'T' or new T[size].

_this

public static JExpression _this()
Returns a reference to "this", an implicit reference to the current object.


_super

public static JExpression _super()
Returns a reference to "super", an implicit reference to the super class.


_null

public static JExpression _null()

lit

public static JExpression lit(boolean b)

lit

public static JExpression lit(int n)

lit

public static JExpression lit(long n)

lit

public static JExpression lit(float f)

lit

public static JExpression lit(double d)

quotify

public static String quotify(char quote,                             String s)
Escapes the given string, then surrounds it by the specified quotation mark.


lit

public static JExpression lit(char c)

lit

public static JExpression lit(String s)

direct

public static JExpression direct(String source)
Creates an expression directly from a source code fragment.

This method can be used as a short-cut to create a JExpression. For example, instead of _a.gt(_b), you can write it as: JExpr.direct("a>b").

Be warned that there is a danger in using this method, as it obfuscates the object model.



Copyright © 2005-2011
Oracle. All Rights Reserved.


NOTHING
NOTHING
Add the Maven Dependecy to your project: maven dependecy for com.amazonaws : aws-java-sdk : 1.3.14