Class CastExpression


  • public class CastExpression
    extends Expression
    Represents a type cast expression
    • Constructor Detail

      • CastExpression

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

      • 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)
        Returns:
        true if strict mode is enable
      • 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)
        Parameters:
        strict - strict mode
      • getExpression

        public Expression getExpression()