org.codehaus.aspectwerkz.attribdef.aspect
Interface IntroductionContainer

All Known Implementing Classes:
DefaultIntroductionContainerStrategy

public interface IntroductionContainer

Interface for the introduction container implementations.

Author:
Alexandre Vasseur

Method Summary
 java.lang.Class getTargetClass(java.lang.Object mixinImpl)
          Returns the target class from an introduction
 java.lang.Object getTargetInstance(java.lang.Object mixinImpl)
          Returns the target instance from an introduction
 java.lang.Object invokeIntroductionPerClass(java.lang.Object callingObject, int methodIndex, java.lang.Object[] parameters)
          Invokes the method on a per class basis.
 java.lang.Object invokeIntroductionPerInstance(java.lang.Object callingObject, int methodIndex, java.lang.Object[] parameters)
          Invokes the method on a per instance basis.
 java.lang.Object invokeIntroductionPerJvm(int methodIndex, java.lang.Object[] parameters)
          Invokes the method on a per JVM basis.
 java.lang.Object invokeIntroductionPerThread(int methodIndex, java.lang.Object[] parameters)
          Invokes the method on a per thread basis.
 void swapImplementation(java.lang.Class implClass)
          Swaps the current introduction implementation.
 

Method Detail

invokeIntroductionPerJvm

public java.lang.Object invokeIntroductionPerJvm(int methodIndex,
                                                 java.lang.Object[] parameters)
Invokes the method on a per JVM basis.

Parameters:
methodIndex - the method index
parameters - the parameters for the invocation
Returns:
the result from the method invocation

invokeIntroductionPerClass

public java.lang.Object invokeIntroductionPerClass(java.lang.Object callingObject,
                                                   int methodIndex,
                                                   java.lang.Object[] parameters)
Invokes the method on a per class basis.

Parameters:
callingObject - a reference to the calling object
methodIndex - the method index
parameters - the parameters for the invocation
Returns:
the result from the method invocation

invokeIntroductionPerInstance

public java.lang.Object invokeIntroductionPerInstance(java.lang.Object callingObject,
                                                      int methodIndex,
                                                      java.lang.Object[] parameters)
Invokes the method on a per instance basis.

Parameters:
callingObject - a reference to the calling object
methodIndex - the method index
parameters - the parameters for the invocation
Returns:
the result from the method invocation

invokeIntroductionPerThread

public java.lang.Object invokeIntroductionPerThread(int methodIndex,
                                                    java.lang.Object[] parameters)
Invokes the method on a per thread basis.

Parameters:
methodIndex - the method index
parameters - the parameters for the invocation
Returns:
the result from the method invocation

swapImplementation

public void swapImplementation(java.lang.Class implClass)
Swaps the current introduction implementation.

Parameters:
implClass - the class of the new implementation to use

getTargetInstance

public java.lang.Object getTargetInstance(java.lang.Object mixinImpl)
Returns the target instance from an introduction

Parameters:
mixinImpl - aka "this" from the mixin impl
Returns:
the target instance or null (if not perInstance deployed mixin)

getTargetClass

public java.lang.Class getTargetClass(java.lang.Object mixinImpl)
Returns the target class from an introduction

Parameters:
mixinImpl - aka "this" from the mixin impl
Returns:
the target class or null (if not perInstance or perClas deployed mixin)


Copyright (c) 2002-2004 The AspectWerkz Team. All Rights Reserved.