Class TryCatchStatement

  • All Implemented Interfaces:
    NodeMetaDataHandler

    public class TryCatchStatement
    extends Statement
    Represents a try { ... } catch () finally {} statement in Groovy
    • Constructor Detail

      • TryCatchStatement

        public TryCatchStatement​(Statement tryStatement,
                                 Statement finallyStatement)
    • Method Detail

      • getFinallyStatement

        public Statement getFinallyStatement()
      • getTryStatement

        public Statement getTryStatement()
      • isResource

        public static boolean isResource​(Expression expression)
      • getCatchStatement

        public CatchStatement getCatchStatement​(int idx)
        Returns:
        the catch statement of the given index or null
      • getResourceStatement

        public ExpressionStatement getResourceStatement​(int idx)
        Returns:
        the resource statement of the given index or null
      • setTryStatement

        public void setTryStatement​(Statement tryStatement)
      • setCatchStatement

        public void setCatchStatement​(int idx,
                                      CatchStatement catchStatement)
      • setFinallyStatement

        public void setFinallyStatement​(Statement finallyStatement)