public class CastExpression extends Expression
Constructor and Description |
---|
CastExpression(ClassNode type,
Expression expression) |
CastExpression(ClassNode type,
Expression expression,
boolean ignoreAutoboxing) |
Modifier and Type | Method and Description |
---|---|
static CastExpression |
asExpression(ClassNode type,
Expression expression) |
Expression |
getExpression() |
String |
getText() |
boolean |
isCoerce() |
boolean |
isIgnoringAutoboxing() |
boolean |
isStrict()
If strict mode is true, then when the compiler generates a cast, it will disable
Groovy casts and rely on a strict cast (CHECKCAST)
|
void |
setCoerce(boolean coerce) |
void |
setStrict(boolean strict)
If strict mode is true, then when the compiler generates a cast, it will disable
Groovy casts and rely on a strict cast (CHECKCAST)
|
void |
setType(ClassNode t) |
String |
toString() |
Expression |
transformExpression(ExpressionTransformer transformer)
Return a copy of the expression calling the transformer on any nested expressions
|
void |
visit(GroovyCodeVisitor visitor) |
getType, transformExpressions, transformExpressions
addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSynthetic
copyNodeMetaData, equals, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, getNodeMetaData, getNodeMetaData, hashCode, putNodeMetaData, removeNodeMetaData, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setNodeMetaData, setSourcePosition
public CastExpression(ClassNode type, Expression expression)
public CastExpression(ClassNode type, Expression expression, boolean ignoreAutoboxing)
public static CastExpression asExpression(ClassNode type, Expression expression)
public boolean isIgnoringAutoboxing()
public boolean isCoerce()
public void setCoerce(boolean coerce)
public boolean isStrict()
public void setStrict(boolean strict)
strict
- strict modepublic void visit(GroovyCodeVisitor visitor)
public Expression transformExpression(ExpressionTransformer transformer)
Expression
transformExpression
in class Expression
public Expression getExpression()
public void setType(ClassNode t)
setType
in class Expression