Package org.codehaus.groovy.ast.expr
Class CastExpression
java.lang.Object
org.codehaus.groovy.ast.ASTNode
org.codehaus.groovy.ast.AnnotatedNode
org.codehaus.groovy.ast.expr.Expression
org.codehaus.groovy.ast.expr.CastExpression
- All Implemented Interfaces:
- GroovydocHolder<AnnotatedNode>,- NodeMetaDataHandler
Represents a typecast expression.
- 
Field SummaryFields inherited from class org.codehaus.groovy.ast.expr.ExpressionEMPTY_ARRAYFields inherited from interface groovy.lang.groovydoc.GroovydocHolderDOC_COMMENT
- 
Constructor SummaryConstructorsConstructorDescriptionCastExpression(ClassNode type, Expression expression) CastExpression(ClassNode type, Expression expression, boolean ignoreAutoboxing) 
- 
Method SummaryModifier and TypeMethodDescriptionstatic CastExpressionasExpression(ClassNode type, Expression expression) getText()booleanisCoerce()booleanbooleanisStrict()If strict mode is true, then when the compiler generates a cast, it will disable Groovy casts and rely on a strict cast (CHECKCAST).voidsetCoerce(boolean coerce) voidsetExpression(Expression expression) voidsetStrict(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).voidtoString()transformExpression(ExpressionTransformer transformer) Transforms this expression and any nested expressions.voidvisit(GroovyCodeVisitor visitor) Methods inherited from class org.codehaus.groovy.ast.expr.ExpressiongetType, transformExpressions, transformExpressionsMethods inherited from class org.codehaus.groovy.ast.AnnotatedNodeaddAnnotation, addAnnotation, addAnnotations, getAnnotations, getAnnotations, getDeclaringClass, getGroovydoc, getInstance, hasNoRealSourcePosition, isSynthetic, setDeclaringClass, setHasNoRealSourcePosition, setSyntheticMethods inherited from class org.codehaus.groovy.ast.ASTNodecopyNodeMetaData, getColumnNumber, getLastColumnNumber, getLastLineNumber, getLineNumber, getMetaDataMap, setColumnNumber, setLastColumnNumber, setLastLineNumber, setLineNumber, setMetaDataMap, setSourcePositionMethods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.codehaus.groovy.ast.NodeMetaDataHandlercopyNodeMetaData, getNodeMetaData, getNodeMetaData, getNodeMetaData, newMetaDataMap, putNodeMetaData, removeNodeMetaData, setNodeMetaData
- 
Constructor Details- 
CastExpression
- 
CastExpression
 
- 
- 
Method Details- 
asExpression
- 
getExpression
- 
setExpression
- 
isIgnoringAutoboxingpublic boolean isIgnoringAutoboxing()
- 
isCoercepublic boolean isCoerce()
- 
setCoercepublic void setCoerce(boolean coerce) 
- 
isStrictpublic 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).
- 
setStrictpublic 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).
- 
toString
- 
visit
- 
transformExpressionDescription copied from class:ExpressionTransforms this expression and any nested expressions.- Specified by:
- transformExpressionin class- Expression
 
- 
getText
- 
setType- Overrides:
- setTypein class- Expression
 
 
-