org.codehaus.aspectwerkz
Interface Mixin

All Known Implementing Classes:
Introduction

public interface Mixin

Interface for the mixin implementations.

Author:
Jonas Bonér

Method Summary
 int getDeploymentModel()
          Returns the deployment model.
 String getImplementationClassName()
          Returns the implementation class name for the mixin.
 String getName()
          Returns the name of the mixin.
 Object invokeMixin(int methodIndex, Object callingObject)
          Invokes the method with the index specified.
 Object invokeMixin(int methodIndex, Object[] parameters, Object callingObject)
          Invokes an introduced method with the index specified.
 void swapImplementation(String className)
          Swaps the current introduction implementation.
 

Method Detail

getName

public String getName()
Returns the name of the mixin.

Returns:
the name

getDeploymentModel

public int getDeploymentModel()
Returns the deployment model.

Returns:
the deployment model

invokeMixin

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

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

invokeMixin

public Object invokeMixin(int methodIndex,
                          Object[] parameters,
                          Object callingObject)
                   throws Throwable
Invokes an introduced method with the index specified.

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

getImplementationClassName

public String getImplementationClassName()
Returns the implementation class name for the mixin.

Returns:
the implementation class name for the mixin

swapImplementation

public void swapImplementation(String className)
Swaps the current introduction implementation.

Parameters:
className - the class name of the new implementation


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.