public interface

IJavaTry

implements ICompound
com.pnfsoftware.jeb.core.units.code.java.IJavaTry

Class Overview

Java AST interface to represent try-catch elements.

Summary

Public Methods
abstract IJavaBlock getCatchBody(int index)
Get a catch body.
abstract int getCatchCount()
Get the number of catch blocks.
abstract IJavaIdentifier getCatchIdentifier(int index)
Get the named identifier associated with the caught exception of a catch block.
abstract IJavaType getCatchType(int index)
Get the type of exception caught by a catch block.
abstract IJavaBlock getFinallyBody()
Get the finally body, if any.
abstract IJavaBlock getTryBody()
Get the try block.
[Expand]
Inherited Methods
From interface com.pnfsoftware.jeb.core.units.code.java.ICompound
From interface com.pnfsoftware.jeb.core.units.code.java.IJavaElement

Public Methods

public abstract IJavaBlock getCatchBody (int index)

Get a catch body.

Parameters
index 0-based catch block index
Returns
  • the catch body

public abstract int getCatchCount ()

Get the number of catch blocks.

Returns
  • the number of catch blocks.

public abstract IJavaIdentifier getCatchIdentifier (int index)

Get the named identifier associated with the caught exception of a catch block.

Parameters
index 0-based catch block index
Returns
  • the caught exception identifier, may be null if there is none

public abstract IJavaType getCatchType (int index)

Get the type of exception caught by a catch block.

Parameters
index 0-based catch block index
Returns
  • the caught exception type

public abstract IJavaBlock getFinallyBody ()

Get the finally body, if any.

Returns
  • the finally block, null if there is none

public abstract IJavaBlock getTryBody ()

Get the try block.

Returns
  • the try block, never null