Rule Execution Server API

ilog.rules.factory
Class IlrTryCatchFinallyStatement

java.lang.Object
  extended by ilog.rules.factory.IlrBaseStatement
      extended by ilog.rules.factory.IlrStatementBlock
          extended by ilog.rules.factory.IlrTryCatchFinallyStatement
All Implemented Interfaces:
ilog.rules.factory.IlrSourceElement, IlrStatement, Serializable

public final class IlrTryCatchFinallyStatement
extends IlrStatementBlock

This class represents a try - catch - finally statement of the rule language.

Warning: Serialized objects of this class will not be compatible with future releases. The current serialization support is appropriate for short-term storage or RMI between applications running the same version of IBM Decision Server.

See Also:
Serialized Form

Nested Class Summary
static class IlrTryCatchFinallyStatement.CatchBlock
          This class represents the catch part of a try - catch - finally statement.
static class IlrTryCatchFinallyStatement.FinallyBlock
          This class represents the finally part of a try - catch - finally statement.
 
Constructor Summary
IlrTryCatchFinallyStatement(IlrStatement[] statements, List catchBlocks, IlrTryCatchFinallyStatement.FinallyBlock finallyBlock)
          Constructs a try - catch - finally statement.
 
Method Summary
 Object exploreStatement(IlrFactoryExplorer explorer)
          Explores the try - catch statement using a factory explorer.
 IlrTryCatchFinallyStatement.CatchBlock getCatchBlockAt(int index)
          Returns the catch block of this statement, at the given index.
 Vector getCatchBlocks()
          Returns the catch blocks of this statement.
 IlrTryCatchFinallyStatement.FinallyBlock getFinallyBlock()
          Returns the finally block of this statement.
 boolean hasCatchClause()
          Indicates if the try statement has at least a catch clause.
 boolean hasFinallyClause()
          Indicates whether the try statement has a finally clause or not.
 
Methods inherited from class ilog.rules.factory.IlrStatementBlock
addStatement, enumerateStatements, getStatementCount, getStatements, removeStatement
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IlrTryCatchFinallyStatement

public IlrTryCatchFinallyStatement(IlrStatement[] statements,
                                   List catchBlocks,
                                   IlrTryCatchFinallyStatement.FinallyBlock finallyBlock)
Constructs a try - catch - finally statement.

Parameters:
statements - The statements in the try block.
catchBlocks - A vector of IlrTryCatchFinallyStatement.CatchBlocks.
finallyBlock - The finally block. It may be null.
Method Detail

getFinallyBlock

public IlrTryCatchFinallyStatement.FinallyBlock getFinallyBlock()
Returns the finally block of this statement.

Returns:
A FinallyBlock representing the finally block, or null if there is no finally block.

getCatchBlocks

public Vector getCatchBlocks()
Returns the catch blocks of this statement.

Returns:
A Vector containing CatchBlock objects. Each CatchBlock represents a catch clause. It returns null if there is no finally block.

hasCatchClause

public boolean hasCatchClause()
Indicates if the try statement has at least a catch clause.

Returns:
A boolean whose value is true if the try statement has at least a catch clause, or else the returned value is false.

hasFinallyClause

public boolean hasFinallyClause()
Indicates whether the try statement has a finally clause or not.

Returns:
A boolean whose value is true if the try statement has a finally clause, or else the returned value is false.

getCatchBlockAt

public IlrTryCatchFinallyStatement.CatchBlock getCatchBlockAt(int index)
Returns the catch block of this statement, at the given index. If there are no catch blocks or the given index is higher than the number of catch blocks, the returned value is null.

Returns:
The catch block at the specified index in this try statement.

exploreStatement

public Object exploreStatement(IlrFactoryExplorer explorer)
Explores the try - catch statement using a factory explorer.

Parameters:
explorer - The factory explorer.
Returns:
An object, the result of the exploration, or null if the method does not return a value.

Rule Execution Server API

© Copyright IBM Corp. 1987, 2013