Package io.sundr.model
Interface Expression
- All Superinterfaces:
Node,Renderable,WithReferences
- All Known Subinterfaces:
ExpressionOrStatement
- All Known Implementing Classes:
Argument,Assign,BinaryExpression,BitwiseAnd,BitwiseOr,Cast,ClassRef,Construct,ContextRef,Declare,Divide,DotClass,Empty,Enclosed,Equals,Field,FieldRef,GreaterThan,GreaterThanOrEqual,Index,InstanceOf,Inverse,Lambda,LeftShift,LessThan,LessThanOrEqual,LocalVariable,LogicalAnd,LogicalOr,MethodCall,Minus,Modulo,Multiply,Negative,NewArray,Not,NotEquals,Plus,Positive,PostDecrement,PostIncrement,PreDecrement,PreIncrement,Property,PropertyRef,RightShift,RightUnsignedShift,Super,Ternary,This,ValueRef,Variable,WithScope,Xor
-
Field Summary
FieldsFields inherited from interface io.sundr.model.Node
AT, CB, CC, CLP, COLN, COMA, CP, DOT, DQ, EMPTY, EQ, EXTENDS, GT, IMPLEMENTS, INDENT, JAVA_LANG, JAVA_LANG_ENUM, JAVA_LANG_OBJECT, JAVA_LANG_STRING, LT, NEWLINE, NEWLINE_PATTERN, OB, OC, OP, Q, SEMICOLN, SEMICOLN_SUFFIX_PATTERN, SPACE, STAR, THROWS, VARARG -
Method Summary
Modifier and TypeMethodDescriptiondefault Expressionand(Expression expression) static Expressionand(Expression left, Expression right) default Expressionand(Function<Expression, Expression> function) default Assignassign(Expression expression) default Assigndefault AssignassignNew(ClassRef type, Expression... arguments) default AssignassignNew(Class type, Expression... arguments) default Assigndefault MethodCallcall(Method method, Expression... expression) static MethodCallcall(TypeDef type, String name, Expression... expression) static MethodCallcall(TypeRef type, String name, Expression... expression) static MethodCallcall(Class type, String name, Expression... expression) default MethodCallcall(String name, Expression... expression) default MethodCallCalls a method on this expression, accepting literal values in place of expressions.default Expressionstatic Expressioncast(TypeRef type, Expression expression) default ExpressionCasts this expression to the type of the given variable.static Expressioncast(Variable<?> variable, Expression expression) Casts an expression to the type of the given variable.default Expressionstatic Expressioncast(Class type, Expression expression) static ConstructcreateNew(ClassRef type, Expression... arguments) static ConstructcreateNew(Class type, Expression... arguments) static NewArraycreateNewArray(TypeRef type, Expression... expressions) static NewArraycreateNewArray(TypeRef type, Integer... sizes) static NewArraycreateNewArray(Class type, Expression... expressions) static NewArraycreateNewArray(Class type, Integer... sizes) default Expressiondivide(Expression expression) static Expressiondivide(Expression left, Expression right) default Expressionenclosed()static Expressionenclosed(Expression expression) default Expressioneq(Expression expression) static Expressioneq(Expression left, Expression right) default Indexindex(int index) default Indexindex(Expression expression) default ExpressioninstanceOf(ClassRef classRef) default ExpressioninstanceOf(Class c) default ExpressionisNull()static ExpressionisNull(Expression expression) static Lambdalambda(WithName parameter, Expression expression) static Lambdastatic Lambdalambda(String parameter, Expression expression) default Expressionminus(Expression expression) static Expressionminus(Expression left, Expression right) default Expressiondefault Expressionmodulo(Expression expression) static Expressionmodulo(Expression left, Expression right) default Expressionmultiply(Expression expression) static Expressionmultiply(Expression left, Expression right) default Expressionne(Expression expression) static Expressionne(Expression left, Expression right) default Expressionnegative()static Expressionnegative(Expression expression) static MethodCallnewCall(String name, Expression... expression) default Expressionnot()static Expressionnot(Expression expression) default ExpressionnotNull()static ExpressionnotNull(Expression expression) default Expressionor(Expression expression) static Expressionor(Expression left, Expression right) default Expressionor(Function<Expression, Expression> function) default Expressionplus(Expression expression) static Expressionplus(Expression left, Expression right) default Expressiondefault Expressionpositive()static Expressionpositive(Expression expression) default Expressiondefault Expressiondefault Expressiondefault Expressiondefault Expressiondefault Expressiondefault Expressiondefault Stringdefault Statementret()static Ternaryternary(Expression condition, Expression thenExpression, Expression elseExpression) Methods inherited from interface io.sundr.model.Renderable
render, tabMethods inherited from interface io.sundr.model.WithReferences
getReferences
-
Field Details
-
NULL
-
-
Method Details
-
renderExpression
-
not
-
not
-
and
-
and
-
and
-
or
-
or
-
or
-
enclosed
-
enclosed
-
positive
-
positive
-
negative
-
negative
-
cast
-
cast
-
cast
-
cast
-
cast
Casts an expression to the type of the given variable.- Parameters:
variable- the variable whose type to cast toexpression- the expression to cast- Returns:
- the cast expression
-
cast
Casts this expression to the type of the given variable.- Parameters:
variable- the variable whose type to cast to- Returns:
- the cast expression
-
eq
-
eq
-
ne
-
ne
-
notNull
-
notNull
-
isNull
-
isNull
-
instanceOf
-
instanceOf
-
plus
-
plus
-
plus
-
minus
-
minus
-
minus
-
multiply
-
multiply
-
divide
-
divide
-
modulo
-
modulo
-
property
-
property
-
property
-
call
-
call
-
call
-
newCall
-
call
-
call
-
call
Calls a method on this expression, accepting literal values in place of expressions. Literals are wrapped in aValueRef, expressions are used as is.- Parameters:
name- the name of the method to callarguments- the method arguments, each a literal or an expression- Returns:
- the method call
-
index
-
index
-
postIncrement
-
postDecrement
-
preIncrement
-
pretDecrement
-
ternary
-
assign
-
assign
-
assignNew
-
assignNew
-
assignNull
-
createNew
-
createNew
-
createNewArray
-
createNewArray
-
createNewArray
-
createNewArray
-
lambda
-
lambda
-
lambda
-
ret
-