org.aspectj.weaver.bcel
Class ExceptionRange
java.lang.Object
org.aspectj.weaver.bcel.ExceptionRange
- All Implemented Interfaces:
- InstructionTargeter
public final class ExceptionRange
- extends java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
body
protected InstructionList body
start
protected InstructionHandle start
end
protected InstructionHandle end
RANGEINSTRUCTION
public static final Instruction RANGEINSTRUCTION
ExceptionRange
public ExceptionRange(InstructionList body,
UnresolvedType exceptionType,
int priority)
- After this constructor is called, this range is not well situated unless
associateWithTargets(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
public ExceptionRange(InstructionList body,
UnresolvedType exceptionType,
boolean insideExisting)
- Parameters:
insideExisting
-
associateWithTargets
public void associateWithTargets(InstructionHandle start,
InstructionHandle end,
InstructionHandle handler)
getHandler
public InstructionHandle getHandler()
getCatchType
public UnresolvedType getCatchType()
getPriority
public int getPriority()
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in class java.lang.Object
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
updateTarget
public void updateTarget(InstructionHandle oldIh,
InstructionHandle newIh,
InstructionList newBody)
isExceptionStart
public static boolean isExceptionStart(InstructionHandle ih)
isExceptionEnd
public static boolean isExceptionEnd(InstructionHandle ih)
containsTarget
public boolean containsTarget(InstructionHandle ih)
- Specified by:
containsTarget
in interface InstructionTargeter
updateTarget
public final void updateTarget(InstructionHandle old_ih,
InstructionHandle new_ih)
- Specified by:
updateTarget
in interface InstructionTargeter
isRangeHandle
public static final boolean isRangeHandle(InstructionHandle ih)
getRange
protected static final org.aspectj.weaver.bcel.Range getRange(InstructionHandle ih)