org.codehaus.aspectwerkz.attribdef.aspect
Class Introduction

java.lang.Object
  extended byorg.codehaus.aspectwerkz.attribdef.aspect.Introduction
All Implemented Interfaces:
Mixin

public class Introduction
extends java.lang.Object
implements Mixin

Interface+Implementation Introduction This represents the inner class mixin based implementation in the system todo: is serializable needed ? if so move all non serializable to a container todo: fix methods name ___AW - does it matters ?

Author:
Alexandre Vasseur

Field Summary
static java.lang.Object[] EMPTY_OBJECT_ARRAY
          An empty Object array.
 
Constructor Summary
Introduction(java.lang.String name, java.lang.Class implClass, Aspect aspect, IntroductionDefinition definition)
          Create a new introduction
 
Method Summary
 int ___AW_getDeploymentModel()
          Returns the mixin deployment model.
 java.lang.Object ___AW_getImplementation()
          Returns the implementation object for the mixin.
 java.lang.String ___AW_getImplementationClassName()
          Returns the implementation class name for the mixin.
 java.lang.String ___AW_getName()
          Returns the name of the mixin.
 java.lang.Object ___AW_invokeMixin(int methodIndex, java.lang.Object callingObject)
          Invokes the method with the index specified.
 java.lang.Object ___AW_invokeMixin(int methodIndex, java.lang.Object[] parameters, java.lang.Object callingObject)
          Invokes an introduced method with the index specified.
 void ___AW_setDeploymentModel(int deploymentModel)
          Sets the deployment model.
 void ___AW_swapImplementation(java.lang.String className)
          Swaps the current introduction implementation.
 Aspect getAspect()
           
 IntroductionDefinition getIntroductionDefinition()
           
static Introduction newInstance(Introduction prototype, Aspect aspect)
          Clone the prototype Introduction.
 void setContainer(IntroductionContainer container)
          Set the container.
 void swapImplementation(java.lang.Class newImplClass)
          Swap the implementation of the mixin represented by this Introduction wrapper.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY_OBJECT_ARRAY

public static final java.lang.Object[] EMPTY_OBJECT_ARRAY
An empty Object array.

Constructor Detail

Introduction

public Introduction(java.lang.String name,
                    java.lang.Class implClass,
                    Aspect aspect,
                    IntroductionDefinition definition)
Create a new introduction

Parameters:
name - of this introduction - by convention the AspectClassFQN $ InnerClass
aspect - which defines this mixin
definition -
Method Detail

newInstance

public static Introduction newInstance(Introduction prototype,
                                       Aspect aspect)
Clone the prototype Introduction.

Parameters:
prototype - introduction
aspect - related aspect (not prototype)
Returns:
new introduction instance

setContainer

public void setContainer(IntroductionContainer container)
Set the container.

Parameters:
container -

getAspect

public Aspect getAspect()
Returns:
aspect attached to this introduction

getIntroductionDefinition

public IntroductionDefinition getIntroductionDefinition()
Returns:
definition related to this introduction

___AW_getName

public java.lang.String ___AW_getName()
Returns the name of the mixin.

Specified by:
___AW_getName in interface Mixin
Returns:
the name

___AW_getDeploymentModel

public int ___AW_getDeploymentModel()
Returns the mixin deployment model.

Specified by:
___AW_getDeploymentModel in interface Mixin
Returns:
the deployment model

___AW_setDeploymentModel

public void ___AW_setDeploymentModel(int deploymentModel)
Sets the deployment model.

Parameters:
deploymentModel - the deployment model

___AW_invokeMixin

public java.lang.Object ___AW_invokeMixin(int methodIndex,
                                          java.lang.Object callingObject)
Invokes the method with the index specified. Invoked by methods without any parameters (slight performance gain since we are saving us one array creation).

Specified by:
___AW_invokeMixin in interface Mixin
Parameters:
methodIndex - the method index
callingObject - a reference to the calling object
Returns:
the result from the invocation

___AW_invokeMixin

public java.lang.Object ___AW_invokeMixin(int methodIndex,
                                          java.lang.Object[] parameters,
                                          java.lang.Object callingObject)
Invokes an introduced method with the index specified.

Specified by:
___AW_invokeMixin in interface Mixin
Parameters:
methodIndex - the method index
parameters - the parameters for the invocation
callingObject - a reference to the calling object
Returns:
the result from the invocation

___AW_getImplementationClassName

public java.lang.String ___AW_getImplementationClassName()
Returns the implementation class name for the mixin.

Specified by:
___AW_getImplementationClassName in interface Mixin
Returns:
the implementation class name for the mixin

___AW_getImplementation

public java.lang.Object ___AW_getImplementation()
Returns the implementation object for the mixin.

Returns:
the implementation for the mixin

___AW_swapImplementation

public void ___AW_swapImplementation(java.lang.String className)
Swaps the current introduction implementation.

Specified by:
___AW_swapImplementation in interface Mixin
Parameters:
className - the class name of the new implementation

swapImplementation

public void swapImplementation(java.lang.Class newImplClass)
Swap the implementation of the mixin represented by this Introduction wrapper.

Parameters:
newImplClass -


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