Class ASTCatchStatement

    • Method Detail

      • isMulticatchStatement

        public boolean isMulticatchStatement()
        Returns true if this node is a multi-catch statement, that is, it catches several unrelated exception types at the same time. Such a block can be declared like the following for example:

        catch (IllegalStateException | IllegalArgumentException e) {}

        Returns:
        True if this node is a multi-catch statement
      • getBody

        public ASTBlock getBody()
        Returns the body of this catch clause.
      • getCaughtExceptionTypeNodes

        public List<ASTType> getCaughtExceptionTypeNodes()
        Returns the list of type nodes denoting the exception types caught by this catch block. The returned list has at least one element.
      • getCaughtExceptionTypes

        public List<Class<? extends Exception>> getCaughtExceptionTypes()
        Returns the list of exception types caught by this catch block. Any of these can be null, if they couldn't be resolved. This can happen if the auxclasspath is not correctly set.
      • getExceptionName

        public String getExceptionName()
        Returns exception name caught by this catch block.