org.codehaus.aspectwerkz.attribdef.aspect
Class Aspect

java.lang.Object
  extended byorg.codehaus.aspectwerkz.attribdef.aspect.Aspect
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
CFlowSystemAspect

public abstract class Aspect
extends java.lang.Object
implements java.io.Serializable

Abstract base class that all Aspect implementations must extend.

Author:
Jonas Bonér
See Also:
Serialized Form

Field Summary
static java.lang.Object[] EMPTY_OBJECT_ARRAY
          An empty Object array.
 
Constructor Summary
Aspect()
          Creates a new abstract advice.
 
Method Summary
 java.lang.Class ___AW_getAspectClass()
          Returns the aspect class.
 AspectDefinition ___AW_getAspectDef()
          Returns the aspect definition.
 AspectContainer ___AW_getContainer()
          Returns the container.
 ContainerType ___AW_getContainerType()
          Returns the container type.
 int ___AW_getDeploymentModel()
          Returns the deployment model.
 java.lang.Class ___AW_getMixinTargetClass(java.lang.String mixinName, java.lang.Object mixinImpl)
          Returns the target class for the mixin of given name which is defined from within this aspect (mixin can have different deployment model from aspect)
 java.lang.Object ___AW_getMixinTargetInstance(java.lang.String mixinName, java.lang.Object mixinImpl)
          Returns the target instance for the mixin of given name which is defined from within this aspect (mixin can have different deployment model from aspect)
 java.lang.String ___AW_getName()
          Returns the name of the aspect.
 java.lang.String ___AW_getParameter(java.lang.String name)
          Returns the value of a parameter with the name specified.
 System ___AW_getSystem()
          Returns the AspectWerkz system housing this advice.
 java.lang.Object ___AW_getTargetClass()
          Returns the target class if aspect is deployed as 'perInstance' or 'perClass' otherwise null.
 java.lang.Object ___AW_getTargetInstance()
          Returns the target instance if aspect is deployed as 'perInstance' otherwise null.
 java.lang.Object ___AW_invokeAdvice(int methodIndex, JoinPoint joinPoint)
          Invokes an introduced method with the index specified.
 void ___AW_setAspectClass(java.lang.Class aspectClass)
          Sets the aspect class.
 void ___AW_setAspectDef(AspectDefinition aspectDef)
          Sets the aspect definition.
 void ___AW_setContainer(AspectContainer container)
          Sets the container.
 void ___AW_setDeploymentModel(int deploymentModel)
          Sets the deployment model.
 void ___AW_setName(java.lang.String name)
          Sets the name of the aspect.
 void ___AW_setParameter(java.lang.String name, java.lang.String value)
          Sets a parameter for the advice.
 void ___AW_setTargetClass(java.lang.Object targetClass)
          Sets the target class.
 void ___AW_setTargetInstance(java.lang.Object targetInstance)
          Sets the target instance.
static Aspect newInstance(Aspect prototype)
          Copy constructor - creates a clone of an advice.
 
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

Aspect

public Aspect()
Creates a new abstract advice.

Method Detail

newInstance

public static Aspect newInstance(Aspect prototype)
Copy constructor - creates a clone of an advice.

Returns:
a clone of the advice

___AW_getSystem

public System ___AW_getSystem()
Returns the AspectWerkz system housing this advice.

Returns:
the system

___AW_invokeAdvice

public java.lang.Object ___AW_invokeAdvice(int methodIndex,
                                           JoinPoint joinPoint)
Invokes an introduced method with the index specified.

Parameters:
methodIndex - the method index
joinPoint - the join point
Returns:
the result from the invocation

___AW_setName

public void ___AW_setName(java.lang.String name)
Sets the name of the aspect.

Parameters:
name - the name of the aspect

___AW_getName

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

Returns:
the name of the aspect

___AW_setDeploymentModel

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

Parameters:
deploymentModel - the deployment model

___AW_getDeploymentModel

public int ___AW_getDeploymentModel()
Returns the deployment model.

Returns:
the deployment model

___AW_getAspectClass

public java.lang.Class ___AW_getAspectClass()
Returns the aspect class.

Returns:
the aspect class

___AW_setAspectClass

public void ___AW_setAspectClass(java.lang.Class aspectClass)
Sets the aspect class.

Parameters:
aspectClass - the aspect class

___AW_setContainer

public void ___AW_setContainer(AspectContainer container)
Sets the container.

Parameters:
container - the container

___AW_getContainer

public AspectContainer ___AW_getContainer()
Returns the container.

Returns:
the container

___AW_getContainerType

public ContainerType ___AW_getContainerType()
Returns the container type.

Returns:
the container type

___AW_getAspectDef

public AspectDefinition ___AW_getAspectDef()
Returns the aspect definition.

Returns:
the aspect definition

___AW_setAspectDef

public void ___AW_setAspectDef(AspectDefinition aspectDef)
Sets the aspect definition.

Parameters:
aspectDef - the aspect definition

___AW_getTargetInstance

public java.lang.Object ___AW_getTargetInstance()
Returns the target instance if aspect is deployed as 'perInstance' otherwise null.

Returns:
the target instance

___AW_setTargetInstance

public void ___AW_setTargetInstance(java.lang.Object targetInstance)
Sets the target instance.

Parameters:
targetInstance - the target instance

___AW_getTargetClass

public java.lang.Object ___AW_getTargetClass()
Returns the target class if aspect is deployed as 'perInstance' or 'perClass' otherwise null.

Returns:
the target class

___AW_setTargetClass

public void ___AW_setTargetClass(java.lang.Object targetClass)
Sets the target class.

Parameters:
targetClass - the target class

___AW_setParameter

public void ___AW_setParameter(java.lang.String name,
                               java.lang.String value)
Sets a parameter for the advice.

Parameters:
name - the name of the parameter
value - the value of the parameter

___AW_getParameter

public java.lang.String ___AW_getParameter(java.lang.String name)
Returns the value of a parameter with the name specified.

Parameters:
name - the name of the parameter
Returns:
the value of the parameter

___AW_getMixinTargetInstance

public java.lang.Object ___AW_getMixinTargetInstance(java.lang.String mixinName,
                                                     java.lang.Object mixinImpl)
Returns the target instance for the mixin of given name which is defined from within this aspect (mixin can have different deployment model from aspect)

Parameters:
mixinName - of the mixin
mixinImpl - miximImplementation aka "this" when called from within the mixin impl
Returns:
the target instance or null if not compliant deployment model

___AW_getMixinTargetClass

public java.lang.Class ___AW_getMixinTargetClass(java.lang.String mixinName,
                                                 java.lang.Object mixinImpl)
Returns the target class for the mixin of given name which is defined from within this aspect (mixin can have different deployment model from aspect)

Parameters:
mixinName - of the mixin
mixinImpl - miximImplementation aka "this" when called from within the mixin impl
Returns:
the target class or null if not compliant deployment model


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