public final class JExprs extends Object
Modifier and Type | Method and Description |
---|---|
static JAssignableExpr |
$v(JParamDeclaration paramDeclaration)
Return a name expression from an annotation processor parameter declaration.
|
static JAssignableExpr |
$v(JVarDeclaration varDeclaration)
Return a name expression from an annotation processor variable declaration.
|
static JAssignableExpr |
$v(String name)
Return a name expression.
|
static JArrayExpr |
array()
Return a new array expression.
|
static JArrayExpr |
array(int... members)
Return a new array expression.
|
static JArrayExpr |
array(JExpr... members)
Return a new array expression.
|
static JArrayExpr |
array(long... members)
Return a new array expression.
|
static JArrayExpr |
array(String... members)
Return a new array expression.
|
static JExpr |
binary(int val)
Generate an
int value in binary base. |
static JExpr |
binary(long val)
Generate a
long value in binary base. |
static JCall |
call(ExecutableElement element)
Generate a method call expression to the given element.
|
static JCall |
call(String name)
Generate a method call expression to the given method name.
|
static JCall |
callStatic(Class<?> type,
String name)
Generate a method call expression to a method on the given static type.
|
static JCall |
callStatic(JType type,
String name)
Generate a method call expression to a method on the given static type.
|
static JCall |
callStatic(String type,
String name)
Generate a method call expression to a method on the given static type.
|
static JExpr |
ch(int val)
Generate a
char value constant. |
static JExpr |
decimal(double val)
Generate a
double value in decimal base. |
static JExpr |
decimal(float val)
Generate a
float value in decimal base. |
static JExpr |
decimal(int val)
Generate an
int value in decimal base. |
static JExpr |
decimal(long val)
Generate a
long value in decimal base. |
static JExpr |
hex(double val)
Generate a
double value in hexadecimal base. |
static JExpr |
hex(float val)
Generate a
float value in hexadecimal base. |
static JExpr |
hex(int val)
Generate an
int value in hexadecimal base. |
static JExpr |
hex(long val)
Generate a
long value in hexadecimal base. |
static JLambda |
lambda()
Return a lambda expression.
|
static JAssignableExpr |
name(JParamDeclaration paramDeclaration)
Return a name expression from an annotation processor parameter declaration.
|
static JAssignableExpr |
name(JVarDeclaration varDeclaration)
Return a name expression from an annotation processor variable declaration.
|
static JAssignableExpr |
name(String name)
Return a name expression.
|
static JExpr |
str(String string)
Generate a string constant value.
|
public static JExpr decimal(int val)
int
value in decimal base.val
- the valuepublic static JExpr decimal(long val)
long
value in decimal base.val
- the valuepublic static JExpr decimal(float val)
float
value in decimal base.val
- the valuepublic static JExpr decimal(double val)
double
value in decimal base.val
- the valuepublic static JExpr hex(int val)
int
value in hexadecimal base.val
- the valuepublic static JExpr hex(long val)
long
value in hexadecimal base.val
- the valuepublic static JExpr hex(float val)
float
value in hexadecimal base.val
- the valuepublic static JExpr hex(double val)
double
value in hexadecimal base.val
- the valuepublic static JExpr binary(int val)
int
value in binary base.val
- the valuepublic static JExpr binary(long val)
long
value in binary base.val
- the valuepublic static JExpr str(String string)
string
- the stringpublic static JExpr ch(int val)
char
value constant.val
- the valuepublic static JCall call(ExecutableElement element)
element
- the method to callpublic static JCall call(String name)
name
- the name of the method to callpublic static JCall callStatic(String type, String name)
type
- the type to call againstname
- the name of the method to callpublic static JCall callStatic(JType type, String name)
type
- the type to call againstname
- the name of the method to callpublic static JCall callStatic(Class<?> type, String name)
type
- the type to call againstname
- the name of the method to callpublic static JAssignableExpr $v(String name)
name(String)
.name
- the namepublic static JAssignableExpr $v(JParamDeclaration paramDeclaration)
paramDeclaration
- the method parameterpublic static JAssignableExpr $v(JVarDeclaration varDeclaration)
varDeclaration
- the variable declarationpublic static JAssignableExpr name(String name)
name
- the namepublic static JAssignableExpr name(JParamDeclaration paramDeclaration)
paramDeclaration
- the method parameterpublic static JAssignableExpr name(JVarDeclaration varDeclaration)
varDeclaration
- the variable declarationpublic static JArrayExpr array()
public static JArrayExpr array(JExpr... members)
members
- the initial members of the arraypublic static JArrayExpr array(String... members)
members
- the initial members of the arraypublic static JArrayExpr array(int... members)
members
- the initial members of the arraypublic static JArrayExpr array(long... members)
members
- the initial members of the arraypublic static JLambda lambda()
Copyright © 2019 JBoss by Red Hat. All rights reserved.