Package org.objectweb.asm.tree
Class TryCatchBlockNode
- java.lang.Object
-
- org.objectweb.asm.tree.TryCatchBlockNode
-
public class TryCatchBlockNode extends java.lang.Object
A node that represents a try catch block.
-
-
Field Summary
Fields Modifier and Type Field Description LabelNode
end
The end of the exception handler's scope (exclusive).LabelNode
handler
The beginning of the exception handler's code.java.util.List<TypeAnnotationNode>
invisibleTypeAnnotations
The runtime invisible type annotations on the exception handler type.LabelNode
start
The beginning of the exception handler's scope (inclusive).java.lang.String
type
The internal name of the type of exceptions handled by the handler.java.util.List<TypeAnnotationNode>
visibleTypeAnnotations
The runtime visible type annotations on the exception handler type.
-
Constructor Summary
Constructors Constructor Description TryCatchBlockNode(LabelNode start, LabelNode end, LabelNode handler, java.lang.String type)
Constructs a newTryCatchBlockNode
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(org.objectweb.asm.MethodVisitor methodVisitor)
Makes the given visitor visit this try catch block.void
updateIndex(int index)
Updates the index of this try catch block in the method's list of try catch block nodes.
-
-
-
Field Detail
-
start
public LabelNode start
The beginning of the exception handler's scope (inclusive).
-
end
public LabelNode end
The end of the exception handler's scope (exclusive).
-
handler
public LabelNode handler
The beginning of the exception handler's code.
-
type
public java.lang.String type
The internal name of the type of exceptions handled by the handler. May be null to catch any exceptions (for "finally" blocks).
-
visibleTypeAnnotations
public java.util.List<TypeAnnotationNode> visibleTypeAnnotations
The runtime visible type annotations on the exception handler type. May be null.
-
invisibleTypeAnnotations
public java.util.List<TypeAnnotationNode> invisibleTypeAnnotations
The runtime invisible type annotations on the exception handler type. May be null.
-
-
Constructor Detail
-
TryCatchBlockNode
public TryCatchBlockNode(LabelNode start, LabelNode end, LabelNode handler, java.lang.String type)
Constructs a newTryCatchBlockNode
.- Parameters:
start
- the beginning of the exception handler's scope (inclusive).end
- the end of the exception handler's scope (exclusive).handler
- the beginning of the exception handler's code.type
- the internal name of the type of exceptions handled by the handler, or null to catch any exceptions (for "finally" blocks).
-
-
Method Detail
-
updateIndex
public void updateIndex(int index)
Updates the index of this try catch block in the method's list of try catch block nodes. This index maybe stored in the 'target' field of the type annotations of this block.- Parameters:
index
- the new index of this try catch block in the method's list of try catch block nodes.
-
accept
public void accept(org.objectweb.asm.MethodVisitor methodVisitor)
Makes the given visitor visit this try catch block.- Parameters:
methodVisitor
- a method visitor.
-
-