| java.lang.Object ch.ethz.prose.crosscut.McutAdvice
All known Subclasses: ch.ethz.prose.crosscut.WildcardConcreteMcutAdvice, ch.ethz.prose.crosscut.ConcreteWildcardMcutAdvice, ch.ethz.prose.crosscut.DefaultMcutAdvice, ch.ethz.prose.crosscut.ConcreteConcreteMcutAdvice, ch.ethz.prose.crosscut.WildcardWildcardMcutAdvice,
McutAdvice | abstract class McutAdvice implements Serializable(Code) | | 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 ). The this
object (if existent, that is, if the invoked method is not static)
is the first argument.
- the number of valid arguments
- the
UserDefinedMCSignature object describing the static
information about the advice action to be invoked.
Because of performance reasons, thi class expose a part of the
inner structure of this class. In addition to the protected
stackArgs ,stackArgsLength , and advice ,
for which no setters/getters are provided, the construtor invokes
the allocStackArgs template method to allocate
the space for the stackArgs array. 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 make execute 's task
more efficient (because execute will avoid array copying).
|
stackArgsLength | protected transient int stackArgsLength(Code) | | |
allocStackArgs | protected void allocStackArgs(int expectedLength)(Code) | | |
|
|