C# Class Rhino.Ast.TryStatement

Try/catch/finally statement.
Try/catch/finally statement. Node type is Rhino.Token.TRY .

TryStatement : try Block Catch try Block Finally try Block Catch Finally Catch : catch ( Identifier ) Block Finally : finally Block
Inheritance: AstNode
显示文件 Open project: hazzik/Rhino.Net Class Usage Examples

Public Methods

Method Description
AddCatchClause ( CatchClause clause ) : void

Add a catch-clause to the end of the list, and sets its parent to this node.

Add a catch-clause to the end of the list, and sets its parent to this node.

GetCatchClauses ( ) : IList

Returns list of CatchClause nodes. If there are no catch clauses, returns an immutable empty list.

GetFinallyBlock ( ) : AstNode

Returns finally block, or null if not present

GetFinallyPosition ( ) : int

Returns position of finally keyword, if present, or -1

GetTryBlock ( ) : AstNode
SetCatchClauses ( IList catchClauses ) : void

Sets list of CatchClause nodes. Also sets their parents to this node. May be null . Replaces any existing catch clauses for this node.

SetFinallyBlock ( AstNode finallyBlock ) : void

Sets finally block, and sets its parent to this node.

Sets finally block, and sets its parent to this node. May be null .

SetFinallyPosition ( int finallyPosition ) : void

Sets position of finally keyword, if present, or -1

SetTryBlock ( AstNode tryBlock ) : void

Sets try block.

Sets try block. Also sets its parent to this node.

ToSource ( int depth ) : string
TryStatement ( ) : System.Collections.Generic
TryStatement ( int pos ) : System.Collections.Generic
TryStatement ( int pos, int len ) : System.Collections.Generic
Visit ( NodeVisitor v ) : void

Visits this node, then the try-block, then any catch clauses, and then any finally block.

Visits this node, then the try-block, then any catch clauses, and then any finally block.

Method Details

AddCatchClause() public method

Add a catch-clause to the end of the list, and sets its parent to this node.
Add a catch-clause to the end of the list, and sets its parent to this node.
/// } if /// clause /// is /// null ///
public AddCatchClause ( CatchClause clause ) : void
clause CatchClause
return void

GetCatchClauses() public method

Returns list of CatchClause nodes. If there are no catch clauses, returns an immutable empty list.
public GetCatchClauses ( ) : IList
return IList

GetFinallyBlock() public method

Returns finally block, or null if not present
public GetFinallyBlock ( ) : AstNode
return AstNode

GetFinallyPosition() public method

Returns position of finally keyword, if present, or -1
public GetFinallyPosition ( ) : int
return int

GetTryBlock() public method

public GetTryBlock ( ) : AstNode
return AstNode

SetCatchClauses() public method

Sets list of CatchClause nodes. Also sets their parents to this node. May be null . Replaces any existing catch clauses for this node.
public SetCatchClauses ( IList catchClauses ) : void
catchClauses IList
return void

SetFinallyBlock() public method

Sets finally block, and sets its parent to this node.
Sets finally block, and sets its parent to this node. May be null .
public SetFinallyBlock ( AstNode finallyBlock ) : void
finallyBlock AstNode
return void

SetFinallyPosition() public method

Sets position of finally keyword, if present, or -1
public SetFinallyPosition ( int finallyPosition ) : void
finallyPosition int
return void

SetTryBlock() public method

Sets try block.
Sets try block. Also sets its parent to this node.
/// } if /// tryBlock /// is /// null ///
public SetTryBlock ( AstNode tryBlock ) : void
tryBlock AstNode
return void

ToSource() public method

public ToSource ( int depth ) : string
depth int
return string

TryStatement() public method

public TryStatement ( ) : System.Collections.Generic
return System.Collections.Generic

TryStatement() public method

public TryStatement ( int pos ) : System.Collections.Generic
pos int
return System.Collections.Generic

TryStatement() public method

public TryStatement ( int pos, int len ) : System.Collections.Generic
pos int
len int
return System.Collections.Generic

Visit() public method

Visits this node, then the try-block, then any catch clauses, and then any finally block.
Visits this node, then the try-block, then any catch clauses, and then any finally block.
public Visit ( NodeVisitor v ) : void
v NodeVisitor
return void