org.codehaus.aspectwerkz.aspect.management
Class PointcutManager

java.lang.Object
  extended byorg.codehaus.aspectwerkz.aspect.management.PointcutManager

public class PointcutManager
extends Object

Manages pointcuts and introductions defined by a specfic aspect.

Author:
Jonas Bonér , Alexandre Vasseur

Field Summary
protected  List m_cflowPointcuts
          Holds references to all the pointcuts that has a cflow pointcut.
protected  int m_deploymentModel
          The deployment model for the aspect.
protected  String[] m_introductions
          Holds references to all the the introductions.
protected  String m_name
          The name of the aspect.
protected  List m_pointcuts
          Holds references to all the pointcuts.
 
Constructor Summary
PointcutManager(String name)
          Creates a new aspect.
PointcutManager(String name, int deploymentModel)
          Creates a new aspect.
 
Method Summary
 void addIntroduction(String introduction)
          Adds an introduction to the open class.
 void addIntroductions(String[] introductions)
          Adds an array with introductions to the open class.
 void addPointcut(Pointcut pointcut)
          Adds a new pointcut.
 boolean equals(Object o)
           
 Pointcut getCflowPointcut(String expression)
          Returns the cflow pointcut for a specific expression.
 List getCflowPointcuts()
          Returns all the pointcuts defined by a specific aspect that has a cflow pointcut referenced.
 List getCflowPointcuts(ExpressionContext ctx)
          Returns all the cflow pointcuts for the join point specified.
 int getDeploymentModel()
          Returns the deployment model for the aspect.
 String getDeploymentModelAsString()
          Returns the deployment model for the aspect.
 String[] getIntroductions()
          Returns the introductions for the open class.
 String getName()
          Returns the name of the aspect.
 Pointcut getPointcut(String expression)
          Returns the pointcut for a specific expression.
 List getPointcuts()
          Returns all the pointcuts defined by a specific aspect.
 List getPointcuts(ExpressionContext ctx)
          Returns all the pointcuts for the join point specified.
 int hashCode()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_pointcuts

protected final List m_pointcuts
Holds references to all the pointcuts.


m_cflowPointcuts

protected final List m_cflowPointcuts
Holds references to all the pointcuts that has a cflow pointcut.


m_introductions

protected String[] m_introductions
Holds references to all the the introductions.


m_name

protected final String m_name
The name of the aspect.


m_deploymentModel

protected final int m_deploymentModel
The deployment model for the aspect.

Constructor Detail

PointcutManager

public PointcutManager(String name)
Creates a new aspect.

Parameters:
name - the name of the aspect

PointcutManager

public PointcutManager(String name,
                       int deploymentModel)
Creates a new aspect.

Parameters:
name - the name of the aspect
deploymentModel - the deployment model for the aspect
Method Detail

getName

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

Returns:
the aspect name

getDeploymentModel

public int getDeploymentModel()
Returns the deployment model for the aspect.

Returns:
the deployment model

getDeploymentModelAsString

public String getDeploymentModelAsString()
Returns the deployment model for the aspect.

Returns:
the deployment model

addIntroduction

public final void addIntroduction(String introduction)
Adds an introduction to the open class.

Parameters:
introduction - the name of the introduction to add

addIntroductions

public final void addIntroductions(String[] introductions)
Adds an array with introductions to the open class.

Parameters:
introductions - the introductions to add

addPointcut

public void addPointcut(Pointcut pointcut)
Adds a new pointcut.

Parameters:
pointcut - the pointcut to add

getIntroductions

public String[] getIntroductions()
Returns the introductions for the open class.

Returns:
an array with the introductions for the class

getPointcut

public Pointcut getPointcut(String expression)
Returns the pointcut for a specific expression.

Parameters:
expression - the expression
Returns:
the pointcut, or null

getCflowPointcut

public Pointcut getCflowPointcut(String expression)
Returns the cflow pointcut for a specific expression.

Parameters:
expression - the expression
Returns:
the pointcut, or null

getPointcuts

public List getPointcuts()
Returns all the pointcuts defined by a specific aspect.

Returns:
the pointcuts

getCflowPointcuts

public List getCflowPointcuts()
Returns all the pointcuts defined by a specific aspect that has a cflow pointcut referenced.

Returns:
the pointcuts

getPointcuts

public List getPointcuts(ExpressionContext ctx)
Returns all the pointcuts for the join point specified.

Parameters:
ctx - the expression context
Returns:
the pointcuts that parse

getCflowPointcuts

public List getCflowPointcuts(ExpressionContext ctx)
Returns all the cflow pointcuts for the join point specified.

Parameters:
ctx - the expression context
Returns:
the pointcuts that parse

equals

public boolean equals(Object o)

hashCode

public int hashCode()


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