Class CastExpression


  • public class CastExpression
    extends Expression
    Represents a typecast expression.
    • Constructor Detail

      • CastExpression

        public CastExpression​(ClassNode type,
                              Expression expression,
                              boolean ignoreAutoboxing)
    • Method Detail

      • getExpression

        public Expression getExpression()
      • isIgnoringAutoboxing

        public boolean isIgnoringAutoboxing()
      • isCoerce

        public boolean isCoerce()
      • setCoerce

        public void setCoerce​(boolean coerce)
      • isStrict

        public 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).
      • setStrict

        public 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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getText

        public java.lang.String getText()
        Overrides:
        getText in class ASTNode