org.objectweb.jac.aspects.user
Class UserWrapper

java.lang.Object
  |
  +--org.objectweb.jac.core.Wrapper
        |
        +--org.objectweb.jac.aspects.user.UserWrapper
All Implemented Interfaces:
Advice, ConstructorInterceptor, Interceptor, MethodInterceptor, Serializable

public class UserWrapper
extends Wrapper

This wrapper is used by the user aspect to implement several croscutting treatments.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jac.core.Wrapper
ac, cr
 
Constructor Summary
UserWrapper(AspectComponent ac)
           
 
Method Summary
 void addClass(ClassItem cl)
           
 Object construct(ConstructorInvocation invocation)
           
protected  Object getUser()
           
 Object invoke(MethodInvocation invocation)
           
 Object setUser(Interaction interaction)
          Set user attributes of parameters.
protected  void setUser(Object wrappee, Object user)
          Set user attributes of an object.
 Object setUserOnNew(Interaction interaction)
          Set the user attribute of new objects
 
Methods inherited from class org.objectweb.jac.core.Wrapper
attr, attrdef, defines, getAspectComponent, getAspectComponentName, getExceptionHandlers, proceed, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

UserWrapper

public UserWrapper(AspectComponent ac)
Method Detail

addClass

public void addClass(ClassItem cl)

setUser

protected void setUser(Object wrappee,
                       Object user)
Set user attributes of an object.

Parameters:
wrappee - the object to initialize
user - the user object

getUser

protected Object getUser()

setUserOnNew

public Object setUserOnNew(Interaction interaction)
Set the user attribute of new objects


setUser

public Object setUser(Interaction interaction)

Set user attributes of parameters.


invoke

public Object invoke(MethodInvocation invocation)
              throws Throwable
Specified by:
invoke in interface MethodInterceptor
Overrides:
invoke in class Wrapper
Throwable

construct

public Object construct(ConstructorInvocation invocation)
                 throws Throwable
Specified by:
construct in interface ConstructorInterceptor
Overrides:
construct in class Wrapper
Throwable