Modifier and Type | Interface and Description |
---|---|
interface |
JAnonymousClassDef
An anonymous class definition.
|
interface |
JArrayExpr
An array expression, which can have more values added to it.
|
interface |
JAssignableExpr
An expression which is assignable (that is, is a valid "lvalue").
|
interface |
JCall
A method or constructor call.
|
interface |
JLambda
A Java 8 lambda.
|
Modifier and Type | Field and Description |
---|---|
static JExpr |
JExpr.FALSE
The constant expression for
false . |
static JExpr |
JExpr.NULL
The constant expression for
null . |
static JExpr |
JExpr.ONE
The constant expression for the integer one.
|
static JExpr |
JExpr.THIS
The constant expression for
this . |
static JExpr |
JExpr.TRUE
The constant expression for
true . |
static JExpr |
JExpr.ZERO
The constant expression for the integer zero.
|
Modifier and Type | Method and Description |
---|---|
JExpr |
JType._class()
An expression of the form
ThisType.class . |
JExpr |
JExpr._instanceof(Class<?> type)
Get a type-testing expression using the
instanceof operator. |
JExpr |
JExpr._instanceof(JType type)
Get a type-testing expression using the
instanceof operator. |
JExpr |
JExpr._instanceof(String type)
Get a type-testing expression using the
instanceof operator. |
JExpr |
JType._new(int dim)
Construct a new instance of this array type.
|
JExpr |
JType._new(JExpr dim)
Construct a new instance of this array type.
|
JExpr |
JType._super()
An expression of the form
ThisType.super . |
JExpr |
JType._this()
An expression of the form
ThisType.this . |
JExpr |
JAssignableExpr.addAssign(JExpr e1)
Combine this expression with another using the binary
+= operator. |
JExpr |
JExpr.and(JExpr e1)
Combine this expression with another using the binary
&& operator. |
JExpr |
JAssignableExpr.andAssign(JExpr e1)
Combine this expression with another using the binary
&= operator. |
JExpr[] |
JCall.arguments() |
JExpr[] |
JSimpleArgs.arguments()
Get the arguments defined thus far.
|
JExpr |
JAssignableExpr.assign(JExpr e1)
Combine this expression with another using the binary
= operator. |
JExpr |
JExpr.band(JExpr e1)
Combine this expression with another using the binary
& operator. |
static JExpr |
JExprs.binary(int val)
Generate an
int value in binary base. |
static JExpr |
JExprs.binary(long val)
Generate a
long value in binary base. |
JExpr |
JExpr.bor(JExpr e1)
Combine this expression with another using the binary
| operator. |
JExpr |
JExpr.bxor(JExpr e1)
Combine this expression with another using the binary
^ operator. |
JExpr |
JExpr.cast(Class<?> type)
Get an expression which is a cast of this expression to the given type.
|
JExpr |
JExpr.cast(JType type)
Get an expression which is a cast of this expression to the given type.
|
JExpr |
JExpr.cast(String type)
Get an expression which is a cast of this expression to the given type.
|
static JExpr |
JExprs.ch(int val)
Generate a
char value constant. |
JExpr |
JExpr.comp()
Invert this expression using the unary
~ operator. |
JExpr |
JExpr.cond(JExpr ifTrue,
JExpr ifFalse)
Combine this expression with two others using the ternary
? : operator. |
static JExpr |
JExprs.decimal(double val)
Generate a
double value in decimal base. |
static JExpr |
JExprs.decimal(float val)
Generate a
float value in decimal base. |
static JExpr |
JExprs.decimal(int val)
Generate an
int value in decimal base. |
static JExpr |
JExprs.decimal(long val)
Generate a
long value in decimal base. |
JExpr |
JExpr.div(JExpr e1)
Combine this expression with another using the binary
/ operator. |
JExpr |
JAssignableExpr.divAssign(JExpr e1)
Combine this expression with another using the binary
/= operator. |
JExpr |
JExpr.eq(JExpr e1)
Combine this expression with another using the binary
== operator. |
JExpr |
JExpr.ge(JExpr e1)
Combine this expression with another using the binary
>= operator. |
JExpr |
JExpr.gt(JExpr e1)
Combine this expression with another using the binary
> operator. |
static JExpr |
JExprs.hex(double val)
Generate a
double value in hexadecimal base. |
static JExpr |
JExprs.hex(float val)
Generate a
float value in hexadecimal base. |
static JExpr |
JExprs.hex(int val)
Generate an
int value in hexadecimal base. |
static JExpr |
JExprs.hex(long val)
Generate a
long value in hexadecimal base. |
JExpr |
JExpr.idx(int idx)
Get an element of this array expression.
|
JExpr |
JExpr.le(JExpr e1)
Combine this expression with another using the binary
<= operator. |
JExpr |
JExpr.length()
Get the
length expression of this array expression. |
JExpr |
JExpr.lshr(JExpr e1)
Combine this expression with another using the binary
>>> operator. |
JExpr |
JAssignableExpr.lshrAssign(JExpr e1)
Combine this expression with another using the binary
>>>= operator. |
JExpr |
JExpr.lt(JExpr e1)
Combine this expression with another using the binary
< operator. |
JExpr |
JType.methodRef(ExecutableElement method)
Get a method reference of this type.
|
JExpr |
JType.methodRef(String name)
Get a method reference of this type.
|
JExpr |
JExpr.minus(JExpr e1)
Combine this expression with another using the binary
- operator. |
JExpr |
JExpr.mod(JExpr e1)
Combine this expression with another using the binary
% operator. |
JExpr |
JAssignableExpr.modAssign(JExpr e1)
Combine this expression with another using the binary
%= operator. |
JExpr |
JAssignableExpr.mulAssign(JExpr e1)
Combine this expression with another using the binary
*= operator. |
JExpr |
JExpr.ne(JExpr e1)
Combine this expression with another using the binary
!= operator. |
JExpr |
JExpr.neg()
Negate this expression using the unary
- operator. |
JExpr |
JExpr.not()
Invert this expression using the unary
! operator. |
JExpr |
JExpr.or(JExpr e1)
Combine this expression with another using the binary
|| operator. |
JExpr |
JAssignableExpr.orAssign(JExpr e1)
Combine this expression with another using the binary
|= operator. |
JExpr |
JExpr.paren()
Explicitly wrap this expression in parentheses.
|
JExpr |
JExpr.plus(JExpr e1)
Combine this expression with another using the binary
+ operator. |
JExpr |
JAssignableExpr.postDec()
Apply the postfix
-- operator to this expression. |
JExpr |
JAssignableExpr.postInc()
Apply the postfix
++ operator to this expression. |
JExpr |
JAssignableExpr.preDec()
Apply the prefix
-- operator to this expression. |
JExpr |
JAssignableExpr.preInc()
Apply the prefix
++ operator to this expression. |
JExpr |
JExpr.shl(JExpr e1)
Combine this expression with another using the binary
<< operator. |
JExpr |
JAssignableExpr.shlAssign(JExpr e1)
Combine this expression with another using the binary
<<= operator. |
JExpr |
JExpr.shr(JExpr e1)
Combine this expression with another using the binary
>> operator. |
JExpr |
JAssignableExpr.shrAssign(JExpr e1)
Combine this expression with another using the binary
>>= operator. |
static JExpr |
JExprs.str(String string)
Generate a string constant value.
|
JExpr |
JAssignableExpr.subAssign(JExpr e1)
Combine this expression with another using the binary
-= operator. |
JExpr |
JBlock.tempVar(Class<?> type,
JExpr value)
Insert a local variable declaration at this point with a generated name.
|
JExpr |
JBlock.tempVar(JType type,
JExpr value)
Insert a local variable declaration at this point with a generated name.
|
JExpr |
JBlock.tempVar(String type,
JExpr value)
Insert a local variable declaration at this point with a generated name.
|
JExpr |
JExpr.times(JExpr e1)
Combine this expression with another using the binary
* operator. |
JExpr |
JAssignableExpr.xorAssign(JExpr e1)
Combine this expression with another using the binary
^= operator. |
Modifier and Type | Method and Description |
---|---|
JStatement |
JBlock._assert(JExpr expr)
Insert an
assert statement at this point. |
JStatement |
JBlock._assert(JExpr expr,
JExpr message)
Insert an
assert statement at this point with a message. |
JBlock |
JSwitch._case(JExpr expr)
Add a switch case.
|
JMethodDef |
JMethodDef._default(JExpr expr)
A default value for an annotation method.
|
JBlock |
JBlock._do(JExpr cond)
Insert a
do /while statement at this point. |
JIf |
JBlock._if(JExpr cond)
Insert an
if statement at this point. |
JExpr |
JType._new(JExpr dim)
Construct a new instance of this array type.
|
JStatement |
JBlock._return(JExpr expr)
Insert a
return statement at this point. |
JSwitch |
JBlock._switch(JExpr expr)
Insert a
switch statement at this point. |
JBlock |
JBlock._synchronized(JExpr synchExpr)
Insert a
synchronized block at this point. |
JStatement |
JBlock._throw(JExpr expr)
Insert a
throw statement at this point. |
JBlock |
JBlock._while(JExpr cond)
Insert a
while statement at this point. |
JArrayExpr |
JArrayExpr.add(JExpr value)
Add an element to this array.
|
JStatement |
JBlock.add(JExpr expr)
Insert an expression statement at this point.
|
JVarDeclaration |
JVarDeclaration.add(String name,
JExpr init)
Add another item to this declaration.
|
JStatement |
JBlock.addAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
+= ) expression at this point. |
JExpr |
JAssignableExpr.addAssign(JExpr e1)
Combine this expression with another using the binary
+= operator. |
JExpr |
JExpr.and(JExpr e1)
Combine this expression with another using the binary
&& operator. |
JStatement |
JBlock.andAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
&= ) expression at this point. |
JExpr |
JAssignableExpr.andAssign(JExpr e1)
Combine this expression with another using the binary
&= operator. |
JCall |
JCall.arg(JExpr expr)
Add an actual parameter argument to this call.
|
JEnumConstant |
JEnumConstant.arg(JExpr expr)
Add an argument.
|
JSimpleArgs |
JSimpleArgs.arg(JExpr expr)
Add an argument.
|
static JArrayExpr |
JExprs.array(JExpr... members)
Return a new array expression.
|
JStatement |
JBlock.assign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
= ) expression at this point. |
JExpr |
JAssignableExpr.assign(JExpr e1)
Combine this expression with another using the binary
= operator. |
JExpr |
JExpr.band(JExpr e1)
Combine this expression with another using the binary
& operator. |
JLambda |
JLambda.body(JExpr expr)
Set the lambda body as an expression.
|
JExpr |
JExpr.bor(JExpr e1)
Combine this expression with another using the binary
| operator. |
JExpr |
JExpr.bxor(JExpr e1)
Combine this expression with another using the binary
^ operator. |
JCall |
JBlock.call(JExpr obj,
ExecutableElement element)
Insert a method invocation at this point.
|
JCall |
JBlock.call(JExpr obj,
String name)
Insert a method invocation at this point.
|
JExpr |
JExpr.cond(JExpr ifTrue,
JExpr ifFalse)
Combine this expression with two others using the ternary
? : operator. |
JExpr |
JExpr.div(JExpr e1)
Combine this expression with another using the binary
/ operator. |
JStatement |
JBlock.divAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
/= ) expression at this point. |
JExpr |
JAssignableExpr.divAssign(JExpr e1)
Combine this expression with another using the binary
/= operator. |
JIf |
JIf.elseIf(JExpr cond)
Add an
if statement to the else block. |
JExpr |
JExpr.eq(JExpr e1)
Combine this expression with another using the binary
== operator. |
JVarDeclaration |
JClassDefSection.field(int mods,
Class<?> type,
String name,
JExpr init)
Add a field to this type.
|
JVarDeclaration |
JClassDefSection.field(int mods,
JType type,
String name,
JExpr init)
Add a field to this type.
|
JVarDeclaration |
JClassDefSection.field(int mods,
String type,
String name,
JExpr init)
Add a field to this type.
|
JBlock |
JBlock.forEach(int mods,
Class<?> type,
String name,
JExpr iterable)
Insert a "for-each" style
for loop at this point. |
JBlock |
JBlock.forEach(int mods,
JType type,
String name,
JExpr iterable)
Insert a "for-each" style
for loop at this point. |
JBlock |
JBlock.forEach(int mods,
String type,
String name,
JExpr iterable)
Insert a "for-each" style
for loop at this point. |
JExpr |
JExpr.ge(JExpr e1)
Combine this expression with another using the binary
>= operator. |
JExpr |
JExpr.gt(JExpr e1)
Combine this expression with another using the binary
> operator. |
JAssignableExpr |
JExpr.idx(JExpr idx)
Get an element of this array expression.
|
JVarDeclaration |
JFor.init(int mods,
Class<?> type,
String name,
JExpr value)
Add a loop initializer.
|
JVarDeclaration |
JFor.init(int mods,
JType type,
String name,
JExpr value)
Add a loop initializer.
|
JVarDeclaration |
JFor.init(int mods,
String type,
String name,
JExpr value)
Add a loop initializer.
|
JExpr |
JExpr.le(JExpr e1)
Combine this expression with another using the binary
<= operator. |
JExpr |
JExpr.lshr(JExpr e1)
Combine this expression with another using the binary
>>> operator. |
JStatement |
JBlock.lshrAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
>>>= ) expression at this point. |
JExpr |
JAssignableExpr.lshrAssign(JExpr e1)
Combine this expression with another using the binary
>>>= operator. |
JExpr |
JExpr.lt(JExpr e1)
Combine this expression with another using the binary
< operator. |
JExpr |
JExpr.minus(JExpr e1)
Combine this expression with another using the binary
- operator. |
JExpr |
JExpr.mod(JExpr e1)
Combine this expression with another using the binary
% operator. |
JStatement |
JBlock.modAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
%= ) expression at this point. |
JExpr |
JAssignableExpr.modAssign(JExpr e1)
Combine this expression with another using the binary
%= operator. |
JStatement |
JBlock.mulAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
*= ) expression at this point. |
JExpr |
JAssignableExpr.mulAssign(JExpr e1)
Combine this expression with another using the binary
*= operator. |
JExpr |
JExpr.ne(JExpr e1)
Combine this expression with another using the binary
!= operator. |
JExpr |
JExpr.or(JExpr e1)
Combine this expression with another using the binary
|| operator. |
JStatement |
JBlock.orAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
|= ) expression at this point. |
JExpr |
JAssignableExpr.orAssign(JExpr e1)
Combine this expression with another using the binary
|= operator. |
JExpr |
JExpr.plus(JExpr e1)
Combine this expression with another using the binary
+ operator. |
JExpr |
JExpr.shl(JExpr e1)
Combine this expression with another using the binary
<< operator. |
JStatement |
JBlock.shlAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
<<= ) expression at this point. |
JExpr |
JAssignableExpr.shlAssign(JExpr e1)
Combine this expression with another using the binary
<<= operator. |
JExpr |
JExpr.shr(JExpr e1)
Combine this expression with another using the binary
>> operator. |
JStatement |
JBlock.shrAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
>>= ) expression at this point. |
JExpr |
JAssignableExpr.shrAssign(JExpr e1)
Combine this expression with another using the binary
>>= operator. |
JStatement |
JBlock.subAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
-= ) expression at this point. |
JExpr |
JAssignableExpr.subAssign(JExpr e1)
Combine this expression with another using the binary
-= operator. |
JExpr |
JBlock.tempVar(Class<?> type,
JExpr value)
Insert a local variable declaration at this point with a generated name.
|
JExpr |
JBlock.tempVar(JType type,
JExpr value)
Insert a local variable declaration at this point with a generated name.
|
JExpr |
JBlock.tempVar(String type,
JExpr value)
Insert a local variable declaration at this point with a generated name.
|
JFor |
JFor.test(JExpr expr)
Add a test expression.
|
JExpr |
JExpr.times(JExpr e1)
Combine this expression with another using the binary
* operator. |
JFor |
JFor.update(JExpr updateExpr)
Add an update expression.
|
JAnnotation |
JAnnotation.value(JExpr expr)
Set the "value" property of this annotation.
|
JAnnotation |
JAnnotation.value(String name,
JExpr expr)
Set the named property of this annotation.
|
JVarDeclaration |
JBlock.var(int mods,
Class<?> type,
String name,
JExpr value)
Insert a local variable declaration at this point.
|
JVarDeclaration |
JBlock.var(int mods,
JType type,
String name,
JExpr value)
Insert a local variable declaration at this point.
|
JVarDeclaration |
JBlock.var(int mods,
String type,
String name,
JExpr value)
Insert a local variable declaration at this point.
|
JVarDeclaration |
JTry.with(int mods,
Class<? extends AutoCloseable> type,
String var,
JExpr init)
Add a resource for
try -with-resources constructs. |
JVarDeclaration |
JTry.with(int mods,
JType type,
String var,
JExpr init)
Add a resource for
try -with-resources constructs. |
JVarDeclaration |
JTry.with(int mods,
String type,
String var,
JExpr init)
Add a resource for
try -with-resources constructs. |
JStatement |
JBlock.xorAssign(JAssignableExpr target,
JExpr e1)
Insert an assignment (
^= ) expression at this point. |
JExpr |
JAssignableExpr.xorAssign(JExpr e1)
Combine this expression with another using the binary
^= operator. |
Copyright © 2016. All rights reserved.