org.codehaus.aspectwerkz.definition
Class ControllerDefinition

java.lang.Object
  extended byorg.codehaus.aspectwerkz.definition.ControllerDefinition
All Implemented Interfaces:
java.io.Serializable

public class ControllerDefinition
extends java.lang.Object
implements java.io.Serializable

Holds the controller definition.

Author:
Jonas Bonér
See Also:
Serialized Form

Constructor Summary
ControllerDefinition()
           
 
Method Summary
 void addMethodPointcutPattern(PointcutDefinition pointcut)
          Adds a new method pointcut pattern.
 java.lang.String getClassName()
          Returns the class name.
 java.lang.String getExpression()
          Returns the expression.
 java.util.List getPointcutRefs()
          Returns a list with the pointcut references.
 boolean matchMethodPointcut(ClassMetaData classMetaData, MethodMetaData methodMetaData)
          Checks if the pointcut matches a certain join point.
 void setClassName(java.lang.String className)
          Sets the controller class name
 void setExpression(java.lang.String expression)
          Sets the expression.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ControllerDefinition

public ControllerDefinition()
Method Detail

getExpression

public java.lang.String getExpression()
Returns the expression.

Returns:
the expression

setExpression

public void setExpression(java.lang.String expression)
Sets the expression. Substitutes all "AND" to "&&" and all "OR" to "||".

Parameters:
expression - the expression

getClassName

public java.lang.String getClassName()
Returns the class name.

Returns:
the class name

setClassName

public void setClassName(java.lang.String className)
Sets the controller class name

Parameters:
className -

addMethodPointcutPattern

public void addMethodPointcutPattern(PointcutDefinition pointcut)
Adds a new method pointcut pattern.

Parameters:
pointcut - the pointcut definition

getPointcutRefs

public java.util.List getPointcutRefs()
Returns a list with the pointcut references.

Returns:
the pointcut references

matchMethodPointcut

public boolean matchMethodPointcut(ClassMetaData classMetaData,
                                   MethodMetaData methodMetaData)
Checks if the pointcut matches a certain join point. Tries to match both method and cflow expressions.

Parameters:
classMetaData - the class meta-data
methodMetaData - the method meta-data
Returns:
boolean


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