| java.lang.Object ch.ethz.inf.iks.jvmai.jvmdi.HotSwapJoinPointImpl
All known Subclasses: ch.ethz.inf.iks.jvmai.jvmdi.HotSwapMethodJoinPointImpl, ch.ethz.inf.iks.jvmai.jvmdi.HotSwapFieldJoinPointImpl,
HotSwapJoinPointImpl | public class HotSwapJoinPointImpl implements CodeJoinPoint,JoinPointStaticPart,ClassSpecific,JoinPointKinds(Code) | | HotSwap Join Points are join-points that can occur within the
execution of a method. They can be arbitrary points within the
bytecode of a method.
author: Angela Nicoara author: Gerald Linhofer version: $Revision$ |
Method Summary | |
native protected Object | doGetLocalVar(int slot, int type, Thread current, int height) Get a local value from the 'caller' (woven method that called the doOn...
callback funtion of
ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl ). | native protected String[] | doGetLocalVariableNames(int slot, int count, Thread current, int height) | native protected void | doGetLocalVars(int slot, int[] types, Object[] vars, Thread current, int height) Get some local values from the 'caller' (woven method that called the doOn...
callback funtion of
ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl ). | native protected void | doSetLocalVar(int slot, int type, Object var, Thread current, int height) Change a local value of the 'caller' (woven method that called the doOn...
callback funtion of
ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl ). | protected int | encodeArgType(Class argType) Returns the type code (
HotSwapJoinPointImpl.ARG_TYPE_OBJECT ,
HotSwapJoinPointImpl.ARG_TYPE_INT ,
HotSwapJoinPointImpl.ARG_TYPE_FLOAT ,
HotSwapJoinPointImpl.ARG_TYPE_BYTE ,
HotSwapJoinPointImpl.ARG_TYPE_CHAR ,
HotSwapJoinPointImpl.ARG_TYPE_SHORT ,
HotSwapJoinPointImpl.ARG_TYPE_BOOLEAN ,
HotSwapJoinPointImpl.ARG_TYPE_LONG or
HotSwapJoinPointImpl.ARG_TYPE_DOUBLE for a given class argType . | public Object | getAopTag() Returns a user-defined object. | public Object[] | getArgs() Returns the arguments with that the target method was called. | public int | getByteCodeIndex() Returns the bytecode index of the last executed instruction from
HotSwapJoinPointImpl.method method or -1 if not initialized. | public CodeJoinPoint | getEnclosingJoinPoint() Return the enclosing join-point. | public String | getKind() | public int | getMask() This method provides information similar to the
AspectJ original getKind. | public Method | getMethod() Returns the method beeing executed
when this joinpoint has been reached. | public Signature | getSignature() | public JoinPointStaticPart | getStaticPart() Returns this object. | public Object | getTarget() Return the target object of this joinpoint. | public Class | getTargetClass() Return the Class of the target. | public Object | getThis() Returns the object on that this join point is executed or the class for
static methods. | public void | init(Object tag) (Re)Initialize this join point. | protected void | initArgTypes() Internal method: initializes some member fields, required to get or
set arguments. | public String | toLongString() | public String | toShortString() |
ARG_TYPE_BOOLEAN | final protected static int ARG_TYPE_BOOLEAN(Code) | | |
ARG_TYPE_BYTE | final protected static int ARG_TYPE_BYTE(Code) | | |
ARG_TYPE_CHAR | final protected static int ARG_TYPE_CHAR(Code) | | |
ARG_TYPE_DOUBLE | final protected static int ARG_TYPE_DOUBLE(Code) | | |
ARG_TYPE_FLOAT | final protected static int ARG_TYPE_FLOAT(Code) | | |
ARG_TYPE_INT | final protected static int ARG_TYPE_INT(Code) | | |
ARG_TYPE_LONG | final protected static int ARG_TYPE_LONG(Code) | | |
ARG_TYPE_OBJECT | final protected static int ARG_TYPE_OBJECT(Code) | | |
ARG_TYPE_SHORT | final protected static int ARG_TYPE_SHORT(Code) | | |
ARG_TYPE_VOID | final protected static int ARG_TYPE_VOID(Code) | | |
height | protected int height(Code) | | 'Height' for enclosing join point. For top level join points this is 0 .
|
method | protected Method method(Code) | | Method to which this join point belongs or
null if not initialized.
|
methodId | protected int methodId(Code) | | Method identifier to which this join point belongs.
(this has nothing to do with JNI jmethodIDs)
|
preAllocatedCodes | protected int[][] preAllocatedCodes(Code) | | |
target | protected Object target(Code) | | Object on which this join point is executed (the class for static methods)
or null if not initialized.
|
HotSwapJoinPointImpl | public HotSwapJoinPointImpl()(Code) | | Constructs an uninitialized HotSwapJoinPoint
instance. To use it
HotSwapJoinPointImpl.init must be called after construction.
|
HotSwapJoinPointImpl | public HotSwapJoinPointImpl(Object tag, int height)(Code) | | Constructs an uninitialized HotSwapJoinPoint
instance. To use it
HotSwapJoinPointImpl.init must be called after construction.
|
doGetLocalVar | native protected Object doGetLocalVar(int slot, int type, Thread current, int height)(Code) | | Get a local value from the 'caller' (woven method that called the doOn...
callback funtion of
ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl ).
Note: the class the callback funtion is belonging to is hard coded in the native
part of this class.
Parameters: slot - index of the local variable. Parameters: type - code for the primitive type of the variable. Parameters: current - the current thread (must be the same thread that runs the caller). the value of the local variable. throws: IlligalIdException - can not find the stack frame of the 'target'. |
doGetLocalVariableNames | native protected String[] doGetLocalVariableNames(int slot, int count, Thread current, int height)(Code) | | |
doGetLocalVars | native protected void doGetLocalVars(int slot, int[] types, Object[] vars, Thread current, int height)(Code) | | Get some local values from the 'caller' (woven method that called the doOn...
callback funtion of
ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl ).
The values must must follow each other in the local variable table, so this may
for example be used to get the arguments from the 'caller'.
Note: the class the callback funtion is belonging to is hard coded in the native
part of this class.
Parameters: slot - the first slot used for arguments (0 for static methods 1 otherwise). Parameters: types - array containing type codes for the parameters. Parameters: vars - array that will be filled with the values of the arguments Parameters: current - the current thread (must be the same thread that runs the caller). throws: IlligalIdException - can not find or use the stack frame of the 'target'. |
doSetLocalVar | native protected void doSetLocalVar(int slot, int type, Object var, Thread current, int height)(Code) | | Change a local value of the 'caller' (woven method that called the doOn...
callback funtion of
ch.ethz.inf.iks.jvmai.jvmdi.AspectInterfaceImpl ).
Note: the class the callback funtion is belonging to is hard coded in the native
part of this class.
Parameters: slot - index of the local variable. Parameters: type - code for the primitive type of the variable. Parameters: var - the new value of the local variable. Parameters: current - the current thread (must be the same thread that runs the caller). throws: IlligalIdException - can not find the stack frame of the 'target'. |
getAopTag | public Object getAopTag()(Code) | | Returns a user-defined object. This object has been
supplied during registration of this joinpoint.
the user defined object. |
getArgs | public Object[] getArgs()(Code) | | Returns the arguments with that the target method was called.
arguments the method was called with, primitive typesare enclosed in there java types. throws: IlligalIdException - can not find the stack frame of the 'target'. |
getByteCodeIndex | public int getByteCodeIndex()(Code) | | Returns the bytecode index of the last executed instruction from
HotSwapJoinPointImpl.method method or -1 if not initialized.
For top level join points, this is a call to the advices callback function.
index throws: IlligalIdException - can not find the stack frame of the 'target'. |
getEnclosingJoinPoint | public CodeJoinPoint getEnclosingJoinPoint()(Code) | | Return the enclosing join-point. The enclosing join-point is join-point of the calling frame.
For instance, if a calls b and x is the method entry join point in b,
x.getEnclosingJoinPoint is the point in the execution of the same thread within
a's frame where the invocation to be is done.
If if a calls b and within b the join-point y is a field
set join point, then x.getEnclsingJoinPoint() and y.getEnclosingJoinPoint()
denote the same join point within a's frame.
the enclosing JoinPoint. throws: IlligalIdException - can not find the stack frame of the 'target'. |
getMask | public int getMask()(Code) | | This method provides information similar to the
AspectJ original getKind. The problem with getKind
is that it works with strings, which is inefficient.
We cannot override getKind -- Java is not
zero-variant on results (at least until 1.4.*).
one of the JoinPointKinds.MASK_XXX integer values |
getMethod | public Method getMethod()(Code) | | Returns the method beeing executed
when this joinpoint has been reached. For MethodEntry Join Points
and method exit join points, methods captured statically and
the method being currently executed coincide. Therefore, for such
joinoints, the signature of the method returned by getMethod
and the one returned by getJoinPointStaticPart().getSignature()
are the same. This is not the case with
Exception Throws, catche Field access & modifications join points.
Method throws: IlligalIdException - can not find the stack frame of the 'target'. |
getSignature | public Signature getSignature()(Code) | | Return the signature of this object
|
getTarget | public Object getTarget()(Code) | | Return the target object of this joinpoint.
|
getTargetClass | public Class getTargetClass()(Code) | | Return the Class of the target.
Note: this returns the class of the method, which executed
the join point, if the target is not a method subclasses
have to overwrite this method.
the class that declared the target object. |
getThis | public Object getThis()(Code) | | Returns the object on that this join point is executed or the class for
static methods.
Object throws: IlligalIdException - can not find the stack frame of the 'target'. |
init | public void init(Object tag)(Code) | | (Re)Initialize this join point.
Parameters: tag - AOP tag associated with this join point |
initArgTypes | protected void initArgTypes()(Code) | | Internal method: initializes some member fields, required to get or
set arguments.
|
|
|