com.sun.codemodel
Interface JExpression

All Superinterfaces:
JGenerable
All Known Subinterfaces:
JAssignmentTarget
All Known Implementing Classes:
JArray, JAssignment, JEnumConstant, JExpressionImpl, JFieldRef, JFieldVar, JInvocation, JStringLiteral, JVar

public interface JExpression
extends JGenerable

A Java expression.

Unlike most of CodeModel, JExpressions are built bottom-up ( meaning you start from leaves and then gradually build compliated expressions by combining them.)

JExpression defines a series of composer methods, which returns a complicated expression (by often taking other JExpressions as parameters. For example, you can build "5+2" by JExpr.lit(5).add(JExpr.lit(2))


Method Summary
 JExpression_instanceof(JType right)
          Returns "[this] instanceof [right]"
 JExpressionband(JExpression right)
          Bit-wise AND '&'.
 JExpressionbor(JExpression right)
          Bit-wise OR '|'.
 JExpressioncand(JExpression right)
          Logical AND '&&'.
 JExpressioncomplement()
          Returns "~[this]" from "[this]".
 com.sun.codemodel.JArrayCompRefcomponent(JExpression index)
           
 JExpressioncor(JExpression right)
          Logical OR '||'.
 JExpressiondecr()
          Returns "[this]--" from "[this]".
 JExpressiondiv(JExpression right)
          Returns "[this]/[right]"
 JExpressioneq(JExpression right)
           
 JExpressiongt(JExpression right)
           
 JExpressiongte(JExpression right)
           
 JExpressionincr()
          Returns "[this]++" from "[this]".
 JInvocationinvoke(JMethod method)
          Returns "[this].[method]".
 JInvocationinvoke(String method)
          Returns "[this].[method]".
 JExpressionlt(JExpression right)
           
 JExpressionlte(JExpression right)
           
 JExpressionminus()
          Returns "-[this]" from "[this]".
 JExpressionminus(JExpression right)
          Returns "[this]-[right]"
 JExpressionmod(JExpression right)
          Returns "[this]%[right]"
 JExpressionmul(JExpression right)
          Returns "[this]*[right]"
 JExpressionne(JExpression right)
           
 JExpressionnot()
          Returns "![this]" from "[this]".
 JExpressionplus(JExpression right)
          Returns "[this]+[right]"
 JFieldRefref(JVar field)
           
 JFieldRefref(String field)
           
 JExpressionshl(JExpression right)
          Returns "[this]<<[right]"
 JExpressionshr(JExpression right)
          Returns "[this]>>[right]"
 JExpressionshrz(JExpression right)
          Returns "[this]>>>[right]"
 JExpressionxor(JExpression right)
           
 
Methods inherited from interface com.sun.codemodel.JGenerable
generate
 

Method Detail

minus

JExpression minus()
Returns "-[this]" from "[this]".


not

JExpression not()
Returns "![this]" from "[this]".


complement

JExpression complement()
Returns "~[this]" from "[this]".


incr

JExpression incr()
Returns "[this]++" from "[this]".


decr

JExpression decr()
Returns "[this]--" from "[this]".


plus

JExpression plus(JExpression right)
Returns "[this]+[right]"


minus

JExpression minus(JExpression right)
Returns "[this]-[right]"


mul

JExpression mul(JExpression right)
Returns "[this]*[right]"


div

JExpression div(JExpression right)
Returns "[this]/[right]"


mod

JExpression mod(JExpression right)
Returns "[this]%[right]"


shl

JExpression shl(JExpression right)
Returns "[this]<<[right]"


shr

JExpression shr(JExpression right)
Returns "[this]>>[right]"


shrz

JExpression shrz(JExpression right)
Returns "[this]>>>[right]"


band

JExpression band(JExpression right)
Bit-wise AND '&'.


bor

JExpression bor(JExpression right)
Bit-wise OR '|'.


cand

JExpression cand(JExpression right)
Logical AND '&&'.


cor

JExpression cor(JExpression right)
Logical OR '||'.


xor

JExpression xor(JExpression right)

lt

JExpression lt(JExpression right)

lte

JExpression lte(JExpression right)

gt

JExpression gt(JExpression right)

gte

JExpression gte(JExpression right)

eq

JExpression eq(JExpression right)

ne

JExpression ne(JExpression right)

_instanceof

JExpression _instanceof(JType right)
Returns "[this] instanceof [right]"


invoke

JInvocation invoke(JMethod method)
Returns "[this].[method]". Arguments shall be added to the returned JInvocation object.


invoke

JInvocation invoke(String method)
Returns "[this].[method]". Arguments shall be added to the returned JInvocation object.


ref

JFieldRef ref(JVar field)

ref

JFieldRef ref(String field)

component

com.sun.codemodel.JArrayCompRef component(JExpression index)


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