Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

ch.ethz.prose.crosscut
Class WildcardConcreteMcutAdvice  view WildcardConcreteMcutAdvice download WildcardConcreteMcutAdvice.java

java.lang.Object
  extended bych.ethz.prose.crosscut.McutAdvice
      extended bych.ethz.prose.crosscut.WildcardConcreteMcutAdvice
All Implemented Interfaces:
java.io.Serializable

class WildcardConcreteMcutAdvice
extends McutAdvice

An advice execution for an advice action of the form XXX(ANY thisObj,String a, int b, other non-wildcards..)

This method redefines the allocStackArgs because it knows that the number of arguments on the stack is exactly equal to the number of arguments of the advice method.


Field Summary
protected  MethodCutSignaturePattern advice
           
private  MethodCut methodCut
           
protected  java.lang.Object[] stackArgs
           
protected  int stackArgsLength
           
 
Constructor Summary
(package private) WildcardConcreteMcutAdvice(MethodCut methodCut, ch.ethz.jvmai.JoinPoint m, MethodCutSignaturePattern a)
           
 
Method Summary
protected  void allocStackArgs(int expectedLength)
           
protected  void execute()
          Invoke (reflection) the method of the advice object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

methodCut

private final MethodCut methodCut

stackArgs

protected transient java.lang.Object[] stackArgs

stackArgsLength

protected transient int stackArgsLength

advice

protected transient MethodCutSignaturePattern advice
Constructor Detail

WildcardConcreteMcutAdvice

WildcardConcreteMcutAdvice(MethodCut methodCut,
                           ch.ethz.jvmai.JoinPoint m,
                           MethodCutSignaturePattern a)
Method Detail

allocStackArgs

protected void allocStackArgs(int expectedLength)
Overrides:
allocStackArgs in class McutAdvice

execute

protected void execute()
                throws java.lang.IllegalAccessException,
                       java.lang.reflect.InvocationTargetException
Invoke (reflection) the method of the advice object. Because of the special signature of the advice, one can pass the stack arguments to Method.invoke. the only modification of the actual stack arguments is to wrap the target into an ANY object.

Specified by:
execute in class McutAdvice