javassist.expr

Class Handler

public class Handler extends Expr

Catch clause.
Method Summary
StringgetFileName()
Returns the source file containing the catch clause.
intgetLineNumber()
Returns the source line number of the catch clause.
CtClassgetType()
Returns the type handled by the catch clause.
voidinsertBefore(String src)
Inserts bytecode at the beginning of the catch clause.
CtClass[]mayThrow()
Returns the list of exceptions that the catch clause may throw.
voidreplace(String statement)
This method has not been implemented yet.
CtBehaviorwhere()
Returns the method or constructor containing the catch clause.

Method Detail

getFileName

public String getFileName()
Returns the source file containing the catch clause.

Returns: null if this information is not available.

getLineNumber

public int getLineNumber()
Returns the source line number of the catch clause.

Returns: -1 if this information is not available.

getType

public CtClass getType()
Returns the type handled by the catch clause.

insertBefore

public void insertBefore(String src)
Inserts bytecode at the beginning of the catch clause. The caught exception is stored in $1.

Parameters: src the source code representing the inserted bytecode. It must be a single statement or block.

mayThrow

public CtClass[] mayThrow()
Returns the list of exceptions that the catch clause may throw.

replace

public void replace(String statement)
This method has not been implemented yet.

Parameters: statement a Java statement.

where

public CtBehavior where()
Returns the method or constructor containing the catch clause.
Javassist, a Java-bytecode translator toolkit.
Copyright (C) 1999-2006 Shigeru Chiba. All Rights Reserved.