org.codehaus.aspectwerkz.attribdef.aspect
Interface AspectContainer

All Known Implementing Classes:
DefaultAspectContainerStrategy

public interface AspectContainer

Interface for the aspect container implementations.

Author:
Jonas Bonér

Method Summary
 void addIntroductionContainer(java.lang.String name, IntroductionContainer introContainer)
          Attach the introduction container to this aspect container to mirror the "aspect contains 0-n introduction"
 ContainerType getContainerType()
          Returns the container type.
 IntroductionContainer getIntroductionContainer(java.lang.String name)
          Returns the introduction container of given name (introduction name) or null if not linked.
 java.lang.reflect.Method getMethod(int index)
          Returns a specific method by the method index.
 Aspect getPerClassAspect(java.lang.Class callingClass)
           
 Aspect getPerInstanceAspect(java.lang.Object callingInstance)
           
 Aspect getPerJvmAspect()
           
 Aspect getPerThreadAspect()
           
 java.lang.Object invokeAdvicePerClass(int methodIndex, JoinPoint joinPoint)
          Invokes the advice method on a per class basis.
 java.lang.Object invokeAdvicePerInstance(int methodIndex, JoinPoint joinPoint)
          Invokes the advice method on a per instance basis.
 java.lang.Object invokeAdvicePerJvm(int methodIndex, JoinPoint joinPoint)
          Invokes the advice method on a per JVM basis.
 java.lang.Object invokeAdvicePerThread(int methodIndex, JoinPoint joinPoint)
          Invokes the advice method on a per thread basis.
 

Method Detail

invokeAdvicePerJvm

public java.lang.Object invokeAdvicePerJvm(int methodIndex,
                                           JoinPoint joinPoint)
Invokes the advice method on a per JVM basis.

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

invokeAdvicePerClass

public java.lang.Object invokeAdvicePerClass(int methodIndex,
                                             JoinPoint joinPoint)
Invokes the advice method on a per class basis.

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

invokeAdvicePerInstance

public java.lang.Object invokeAdvicePerInstance(int methodIndex,
                                                JoinPoint joinPoint)
Invokes the advice method on a per instance basis.

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

invokeAdvicePerThread

public java.lang.Object invokeAdvicePerThread(int methodIndex,
                                              JoinPoint joinPoint)
Invokes the advice method on a per thread basis.

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

getMethod

public java.lang.reflect.Method getMethod(int index)
Returns a specific method by the method index.

Parameters:
index - the method index
Returns:
the method

getContainerType

public ContainerType getContainerType()
Returns the container type.

Returns:
the container type

getPerJvmAspect

public Aspect getPerJvmAspect()
Returns:
the sole instance of a PER_JVM aspect

getPerClassAspect

public Aspect getPerClassAspect(java.lang.Class callingClass)
Parameters:
callingClass -
Returns:
the class attached instance of a PER_CLASS aspect

getPerInstanceAspect

public Aspect getPerInstanceAspect(java.lang.Object callingInstance)
Parameters:
callingInstance -
Returns:
the instance attached instance of a PER_INSTANCE aspect

getPerThreadAspect

public Aspect getPerThreadAspect()
Returns:
the thread attached instance of a PER_CLASS aspect

addIntroductionContainer

public void addIntroductionContainer(java.lang.String name,
                                     IntroductionContainer introContainer)
Attach the introduction container to this aspect container to mirror the "aspect contains 0-n introduction"

Parameters:
name - of the introduction
introContainer - introduction container

getIntroductionContainer

public IntroductionContainer getIntroductionContainer(java.lang.String name)
Returns the introduction container of given name (introduction name) or null if not linked.

Parameters:
name - of the introduction
Returns:
introduction container


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