Interface CtTry

    • Method Detail

      • getCatchers

        java.util.List<CtCatch> getCatchers()
        Gets the catchers of this try.
      • setCatchers

        <T extends CtTry> T setCatchers​(java.util.List<CtCatch> catchers)
        Sets the catchers of this try.
      • addCatcher

        <T extends CtTry> T addCatcher​(CtCatch catcher)
        Adds a catch block.
      • removeCatcher

        boolean removeCatcher​(CtCatch catcher)
        Removes a catch block.
      • getFinalizer

        CtBlock<?> getFinalizer()
        Gets the finalizer block of this try ( finally part).
      • setFinalizer

        <T extends CtTry> T setFinalizer​(CtBlock<?> finalizer)
        Sets the finalizer block of this try ( finally part).
      • clone

        CtTry clone()
        Description copied from interface: CtElement
        Clone the element which calls this method in a new object. Note that that references are kept as is, and thus, so if you clone whole classes or methods, some parts of the cloned element (eg executable references) may still point to the initial element. In this case, consider using methods Refactoring.copyType(CtType) and Refactoring.copyMethod(CtMethod) instead which does additional work beyond cloning.
        Specified by:
        clone in interface CtCodeElement
        Specified by:
        clone in interface CtElement
        Specified by:
        clone in interface CtStatement