Package org.aspectj.weaver.bcel
Class ExceptionRange
java.lang.Object
org.aspectj.weaver.bcel.ExceptionRange
- All Implemented Interfaces:
InstructionTargeter
exceptionRanges are set initially to be low priority. The various setPriority methods should be used accordingly. The priority is
used when we pack the exception table into a method... the exception table should be sorted from high to low priority. Exceptions
we generate for advice is either high priority (higher than anything coming from the original method... most kinds of
non-execution advice) or low priority (lower than anything coming from the original method, for execution advice).
??? This does not account for handler, or any other "statement-level" advice. When such statement level advice happens, we may want to go to a float level, so we can set the priority of advice to be lower than anything it encloses, and higher than anything enclosing it.
-
Field Summary
Modifier and TypeFieldDescriptionprotected InstructionList
protected InstructionHandle
static Instruction
protected InstructionHandle
-
Constructor Summary
ConstructorDescriptionExceptionRange(InstructionList body, UnresolvedType exceptionType, boolean insideExisting)
ExceptionRange(InstructionList body, UnresolvedType exceptionType, int priority)
After this constructor is called, this range is not well situated unlessassociateWithTargets(org.aspectj.apache.bcel.generic.InstructionHandle, org.aspectj.apache.bcel.generic.InstructionHandle, org.aspectj.apache.bcel.generic.InstructionHandle)
is called XXX priority should be fixed -
Method Summary
Modifier and TypeMethodDescriptionvoid
associateWithTargets(InstructionHandle start, InstructionHandle end, InstructionHandle handler)
boolean
boolean
int
protected static org.aspectj.weaver.bcel.Range
int
hashCode()
static boolean
static boolean
static boolean
toString()
void
updateTarget(InstructionHandle old_ih, InstructionHandle new_ih)
void
updateTarget(InstructionHandle oldIh, InstructionHandle newIh, InstructionList newBody)
-
Field Details
-
body
-
start
-
end
-
RANGEINSTRUCTION
-
-
Constructor Details
-
ExceptionRange
After this constructor is called, this range is not well situated unlessassociateWithTargets(org.aspectj.apache.bcel.generic.InstructionHandle, org.aspectj.apache.bcel.generic.InstructionHandle, org.aspectj.apache.bcel.generic.InstructionHandle)
is called XXX priority should be fixed -
ExceptionRange
- Parameters:
insideExisting
-
-
-
Method Details
-
associateWithTargets
public void associateWithTargets(InstructionHandle start, InstructionHandle end, InstructionHandle handler) -
getHandler
-
getCatchType
-
getPriority
public int getPriority() -
toString
-
equals
-
hashCode
public int hashCode() -
updateTarget
public void updateTarget(InstructionHandle oldIh, InstructionHandle newIh, InstructionList newBody) -
isExceptionStart
-
isExceptionEnd
-
containsTarget
- Specified by:
containsTarget
in interfaceInstructionTargeter
-
updateTarget
- Specified by:
updateTarget
in interfaceInstructionTargeter
-
isRangeHandle
-
getRange
-