Class JExprs
java.lang.Object
org.jboss.jdeparser.JExprs
The factory for generating simple expressions.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) static final ThreadLocal<LinkedHashMap<String, JAssignableExpr>> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JAssignableExprReturn a name expression.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 JArrayExprarray()Return a new array expression.static JArrayExprarray(int... members) Return a new array expression.static JArrayExprarray(long... members) Return a new array expression.static JArrayExprReturn a new array expression.static JArrayExprReturn a new array expression.static JExprbinary(int val) Generate anintvalue in binary base.static JExprbinary(long val) Generate alongvalue in binary base.static JCallGenerate a method call expression to the given method name.static JCallcall(ExecutableElement element) Generate a method call expression to the given element.static JCallcallStatic(Class<?> type, String name) Generate a method call expression to a method on the given static type.static JCallcallStatic(String type, String name) Generate a method call expression to a method on the given static type.static JCallcallStatic(JType type, String name) Generate a method call expression to a method on the given static type.static JExprch(int val) Generate acharvalue constant.static JExprdecimal(double val) Generate adoublevalue in decimal base.static JExprdecimal(float val) Generate afloatvalue in decimal base.static JExprdecimal(int val) Generate anintvalue in decimal base.static JExprdecimal(long val) Generate alongvalue in decimal base.static JExprhex(double val) Generate adoublevalue in hexadecimal base.static JExprhex(float val) Generate afloatvalue in hexadecimal base.static JExprhex(int val) Generate anintvalue in hexadecimal base.static JExprhex(long val) Generate alongvalue in hexadecimal base.static JLambdalambda()Return a lambda expression.static JAssignableExprReturn a name expression.static JAssignableExprname(JParamDeclaration paramDeclaration) Return a name expression from an annotation processor parameter declaration.static JAssignableExprname(JVarDeclaration varDeclaration) Return a name expression from an annotation processor variable declaration.static JExprGenerate a string constant value.
-
Field Details
-
cache
-
-
Constructor Details
-
JExprs
private JExprs()
-
-
Method Details
-
decimal
Generate anintvalue in decimal base.- Parameters:
val- the value- Returns:
- the value expression
-
decimal
Generate alongvalue in decimal base.- Parameters:
val- the value- Returns:
- the value expression
-
decimal
Generate afloatvalue in decimal base.- Parameters:
val- the value- Returns:
- the value expression
-
decimal
Generate adoublevalue in decimal base.- Parameters:
val- the value- Returns:
- the value expression
-
hex
Generate anintvalue in hexadecimal base.- Parameters:
val- the value- Returns:
- the value expression
-
hex
Generate alongvalue in hexadecimal base.- Parameters:
val- the value- Returns:
- the value expression
-
hex
Generate afloatvalue in hexadecimal base.- Parameters:
val- the value- Returns:
- the value expression
-
hex
Generate adoublevalue in hexadecimal base.- Parameters:
val- the value- Returns:
- the value expression
-
binary
Generate anintvalue in binary base.- Parameters:
val- the value- Returns:
- the value expression
-
binary
Generate alongvalue in binary base.- Parameters:
val- the value- Returns:
- the value expression
-
str
-
ch
Generate acharvalue constant.- Parameters:
val- the value- Returns:
- the value expression
-
call
Generate a method call expression to the given element.- Parameters:
element- the method to call- Returns:
- the method call
-
call
-
callStatic
-
callStatic
-
callStatic
-
$v
Return a name expression. This method is a shortcut forname(String).- Parameters:
name- the name- Returns:
- the expression
-
$v
Return a name expression from an annotation processor parameter declaration.- Parameters:
paramDeclaration- the method parameter- Returns:
- the expression
-
$v
Return a name expression from an annotation processor variable declaration.- Parameters:
varDeclaration- the variable declaration- Returns:
- the expression
-
name
Return a name expression.- Parameters:
name- the name- Returns:
- the expression
-
name
Return a name expression from an annotation processor parameter declaration.- Parameters:
paramDeclaration- the method parameter- Returns:
- the expression
-
name
Return a name expression from an annotation processor variable declaration.- Parameters:
varDeclaration- the variable declaration- Returns:
- the expression
-
array
Return a new array expression. The array is initially empty.- Returns:
- an array expression
-
array
Return a new array expression. The array is initially filled with the given members.- Parameters:
members- the initial members of the array- Returns:
- an array expression
-
array
Return a new array expression. The array is initially filled with the given strings.- Parameters:
members- the initial members of the array- Returns:
- an array expression
-
array
Return a new array expression. The array is initially filled with the given integers.- Parameters:
members- the initial members of the array- Returns:
- an array expression
-
array
Return a new array expression. The array is initially filled with the given integers.- Parameters:
members- the initial members of the array- Returns:
- an array expression
-
lambda
Return a lambda expression. The expression is initially empty.- Returns:
- the lambda expression
-