Class JTryStatementImpl

    • Constructor Detail

      • JTryStatementImpl

        public JTryStatementImpl​(JContextImpl context)
    • Method Detail

      • addCatch

        public JCompoundStatement addCatch​(java.lang.Class<? extends java.lang.Throwable> t,
                                           java.lang.String varName)
        Description copied from interface: JTryStatement
        Adds a catch clause for the specified Throwable.

        Adding the same Throwable twice causes an exception.

        Specified by:
        addCatch in interface JTryStatement
        Parameters:
        t - Throwable class
        varName - name of Throwable variable to declare
      • catchVariable

        public JLocalVariable catchVariable​(java.lang.Class<? extends java.lang.Throwable> t)
        Description copied from interface: JTryStatement
        Returns a throwable variable of the specificed catch clause

        Throws an exception if addCatch was not called for the specified t.

        Specified by:
        catchVariable in interface JTryStatement
        Parameters:
        t - Throwable class