|
|||||||||
| Home >> All >> ch >> ethz >> prose >> [ crosscut overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
ch.ethz.prose.crosscut
Class McutAdvice

java.lang.Objectch.ethz.prose.crosscut.McutAdvice
- All Implemented Interfaces:
- java.io.Serializable
- Direct Known Subclasses:
- ConcreteConcreteMcutAdvice, ConcreteWildcardMcutAdvice, DefaultMcutAdvice, WildcardConcreteMcutAdvice, WildcardWildcardMcutAdvice
- abstract class McutAdvice
- extends java.lang.Object
- implements java.io.Serializable
- extends java.lang.Object
The McutAdvice encapsulates the transformation of the join-point
data (e.g., target, stack parameters) to the types required to execute
the UserDefinedMCSignature of this crosscut. The execute
method does this job.
An McutAdvice object contains all the data needed
for the advice method invocation:
- An array of objects containing the arguments of the method
being currently invoked (
stackArgs). Thethisobject (if existent, that is, if the invoked method is not static) is the first argument. - the number of valid arguments
- the
UserDefinedMCSignatureobject describing the static information about the advice action to be invoked.- See Also:
- Constant Field Values
Because of performance reasons, thi class expose a part of the inner structure of this class. In addition to the protected
stackArgs,stackArgsLength, andadvice, for which no setters/getters are provided, the construtor invokes theallocStackArgstemplate method to allocate the space for thestackArgsarray. This way, subclasses have the chance to override this method and create an array in which the number of arguments (stackArgsLength) is equal to the actual length of the argument array. Having an array with no trailing nulls will makeexecute's task more efficient (because execute will avoid array copying).
Field Summary protected MethodCutSignaturePatternadvice
private MethodCutmethodCut
protected java.lang.Object[]stackArgs
protected intstackArgsLength
private static intUNKNOWN
Constructor Summary protectedMcutAdvice(MethodCut methodCut, ch.ethz.jvmai.JoinPoint joinPoint, MethodCutSignaturePattern advice)
Method Summary protected voidallocStackArgs(int expectedLength)
protected abstract voidexecute()
Methods inherited from class java.lang.Object clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitField Detail methodCut
private final MethodCut methodCut
UNKNOWN
private static final int UNKNOWN
stackArgs
protected transient java.lang.Object[] stackArgs
stackArgsLength
protected transient int stackArgsLength
advice
protected transient MethodCutSignaturePattern advice
Constructor Detail McutAdvice
protected McutAdvice(MethodCut methodCut, ch.ethz.jvmai.JoinPoint joinPoint, MethodCutSignaturePattern advice)
Method Detail allocStackArgs
protected void allocStackArgs(int expectedLength)
execute
protected abstract void execute() throws java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
Overview Package Class Use Deprecated Index Home >> All >> ch >> ethz >> prose >> [ crosscut overview ] PREV CLASS NEXT CLASS SUMMARY:
JAVADOC |
SOURCE |
DOWNLOAD | NESTED | FIELD | CONSTR | METHODDETAIL: FIELD | CONSTR | METHOD
ch.ethz.prose.crosscut.McutAdvice