try {
//code
} catch(SomeException e) {
//code
}
exceptionThrowingAppender MUST end with a return statement
Due to way the JVM handles exceptions, when exceptionHandlerAppender is run,
the exception can be found on the top of the stack
| Modifier and Type | Field and Description |
|---|---|
| private final StackManipulation | |
| private final StackManipulation | |
| private final Class | |
| private final int |
| Access | Constructor and Description |
|---|---|
| public | SimpleExceptionHandler(StackManipulation exceptionThrowingAppender, StackManipulation exceptionHandlerAppender, Class<? extends Exception> exceptionType, int newLocalVariablesCount)
|
| Modifier and Type | Method and Description |
|---|---|
| public ByteCodeAppender | appender(Implementation.
Implements net. Creates a byte code appender that determines the implementation of the instrumented type's methods. |
| public ByteCodeAppender. | apply(MethodVisitor methodVisitor, Implementation.
Implements net. Applies this byte code appender to a type creation process. |
| public boolean | equals(Object o)
Overrides java. Indicates whether some other object is "equal to" this one. |
| public int | |
| private StackManipulation | |
| public InstrumentedType | prepare(InstrumentedType instrumentedType)
Implements net. Prepares a given instrumented type. |
| private StackManipulation |
| exceptionHandlerAppender | back to summary |
|---|---|
| private final StackManipulation exceptionHandlerAppender | |
| exceptionThrowingAppender | back to summary |
|---|---|
| private final StackManipulation exceptionThrowingAppender | |
| exceptionType | back to summary |
|---|---|
| private final Class<? extends Exception> exceptionType | |
| newLocalVariablesCount | back to summary |
|---|---|
| private final int newLocalVariablesCount | |
| SimpleExceptionHandler | back to summary |
|---|---|
| public SimpleExceptionHandler(StackManipulation exceptionThrowingAppender, StackManipulation exceptionHandlerAppender, Class<? extends Exception> exceptionType, int newLocalVariablesCount) | |
| appender | back to summary |
|---|---|
| public ByteCodeAppender appender(Implementation. Implements net. Doc from net. Creates a byte code appender that determines the implementation of the instrumented type's methods.
| |
| apply | back to summary |
|---|---|
| public ByteCodeAppender. Implements net. Doc from net. Applies this byte code appender to a type creation process.
| |
| equals | back to summary |
|---|---|
| public boolean equals(Object o) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| postTrigger | back to summary |
|---|---|
| private StackManipulation postTrigger(final Label endTryBlock, final Label startCatchBlock) | |
| prepare | back to summary |
|---|---|
| public InstrumentedType prepare(InstrumentedType instrumentedType) Implements net. Doc from net. Prepares a given instrumented type.
| |
| preTrigger | back to summary |
|---|---|
| private StackManipulation preTrigger(final Label startTryBlock, final Label endTryBlock, final Label startCatchBlock) | |