Top Description Fields Constructors Methods
javassist.expr

public Class Handler

extends Expr
Class Inheritance
Imports
javassist.CannotCompileException, .CtBehavior, .CtClass, .NotFoundException, javassist.bytecode.Bytecode, .CodeAttribute, .CodeIterator, .ConstPool, .ExceptionTable, .MethodInfo, .Opcode, javassist.compiler.CompileError, .Javac

A catch clause or a finally block.

Field Summary

Modifier and TypeField and Description
private ExceptionTable
private static String
private int
Inherited from javassist.expr.Expr:
currentPoseditediteratorjavaLangObjectmaxLocalsmaxStackthisClassthisMethod

Constructor Summary

AccessConstructor and Description
protected
Handler(ExceptionTable et, int nth, CodeIterator it, CtClass declaring, MethodInfo m)

Undocumented constructor.

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

null if this information is not available.
getFileName
()

Overrides javassist.expr.Expr.getFileName.

Returns the source file containing the catch clause.

public int

Returns:

-1 if this information is not available.
getLineNumber
()

Overrides javassist.expr.Expr.getLineNumber.

Returns the source line number of the catch clause.

public CtClass
getType()

Returns the type handled by the catch clause.

public void
insertBefore(String
the source code representing the inserted bytecode. It must be a single statement or block.
src
)

Inserts bytecode at the beginning of the catch clause.

public boolean
isFinally()

Returns true if this is a finally block.

public CtClass[]
mayThrow()

Overrides javassist.expr.Expr.mayThrow.

Returns the list of exceptions that the catch clause may throw.

public void
replace(String
a Java statement except try-catch.
statement
)

Implements abstract javassist.expr.Expr.replace.

This method has not been implemented yet.

public CtBehavior
where()

Overrides javassist.expr.Expr.where.

Returns the method or constructor containing the catch clause.

Inherited from javassist.expr.Expr:
checkResultValueeditedgetConstPoolgetEnclosingClassindexOfBytecodelocalsreplacereplace0runEditorstackstoreStackwithinStatic

Field Detail

etableback to summary
private ExceptionTable etable
EXCEPTION_NAMEback to summary
private static String EXCEPTION_NAME
indexback to summary
private int index

Constructor Detail

Handlerback to summary
protected Handler(ExceptionTable et, int nth, CodeIterator it, CtClass declaring, MethodInfo m)

Undocumented constructor. Do not use; internal-use only.

Method Detail

getFileNameback to summary
public String getFileName()

Overrides javassist.expr.Expr.getFileName.

Returns the source file containing the catch clause.

Returns:String

null if this information is not available.

Annotations
@Override
getLineNumberback to summary
public int getLineNumber()

Overrides javassist.expr.Expr.getLineNumber.

Returns the source line number of the catch clause.

Returns:int

-1 if this information is not available.

Annotations
@Override
getTypeback to summary
public CtClass getType() throws NotFoundException

Returns the type handled by the catch clause. If this is a finally block, null is returned.

insertBeforeback to summary
public void insertBefore(String src) throws CannotCompileException

Inserts bytecode at the beginning of the catch clause. The caught exception is stored in $1.

Parameters
src:String

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

isFinallyback to summary
public boolean isFinally()

Returns true if this is a finally block.

mayThrowback to summary
public CtClass[] mayThrow()

Overrides javassist.expr.Expr.mayThrow.

Returns the list of exceptions that the catch clause may throw.

Annotations
@Override
replaceback to summary
public void replace(String statement) throws CannotCompileException

Implements abstract javassist.expr.Expr.replace.

This method has not been implemented yet.

Parameters
statement:String

a Java statement except try-catch.

Annotations
@Override
whereback to summary
public CtBehavior where()

Overrides javassist.expr.Expr.where.

Returns the method or constructor containing the catch clause.

Annotations
@Override