org.springframework.aop.aspectj
Class ConfluenceAspectJExpressionPointcut

java.lang.Object
  extended by org.springframework.aop.support.AbstractExpressionPointcut
      extended by org.springframework.aop.aspectj.ConfluenceAspectJExpressionPointcut
All Implemented Interfaces:
java.io.Serializable, org.springframework.aop.ClassFilter, org.springframework.aop.IntroductionAwareMethodMatcher, org.springframework.aop.MethodMatcher, org.springframework.aop.Pointcut, org.springframework.aop.support.ExpressionPointcut

public final class ConfluenceAspectJExpressionPointcut
extends org.springframework.aop.support.AbstractExpressionPointcut
implements org.springframework.aop.ClassFilter, org.springframework.aop.IntroductionAwareMethodMatcher

This is a duplicate of Spring's AspectJExpressionPointcut with customisations allowing the specification of a classloader to use when parsing pointcut expressions. This is needed in Confluence as the pointcut parser is expected to process classes from the plugin subsystem. These classes are not visible using the context class loader provided at context initialisation.

See Also:
PointcutClassLoaderProcessor, Serialized Form

Field Summary
 
Fields inherited from interface org.springframework.aop.ClassFilter
TRUE
 
Fields inherited from interface org.springframework.aop.Pointcut
TRUE
 
Constructor Summary
ConfluenceAspectJExpressionPointcut()
          Create a new default ConfluenceAspectJExpressionPointcut using the current thread context classloader for class resolution during pointcut processing.
ConfluenceAspectJExpressionPointcut(java.lang.ClassLoader classLoader)
          Create a new ConfluenceAspectJExpressionPointcut using the provided classloader for class resolution during pointcut match processing
ConfluenceAspectJExpressionPointcut(java.lang.Class declarationScope, java.lang.String[] paramNames, java.lang.Class[] paramTypes)
          Create a new AspectJExpressionPointcut with the given settings.
ConfluenceAspectJExpressionPointcut(java.util.Set supportedPrimitives, java.lang.ClassLoader classLoader)
          Create a new AspectJExpressionPointcut with the given supported primitives.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 org.springframework.aop.ClassFilter getClassFilter()
           
 org.springframework.aop.MethodMatcher getMethodMatcher()
           
 org.aspectj.weaver.tools.PointcutExpression getPointcutExpression()
          Return the underlying AspectJ pointcut expression.
 int hashCode()
           
 boolean isRuntime()
           
 boolean matches(java.lang.Class targetClass)
           
 boolean matches(java.lang.reflect.Method method, java.lang.Class targetClass)
           
 boolean matches(java.lang.reflect.Method method, java.lang.Class targetClass, boolean beanHasIntroductions)
           
 boolean matches(java.lang.reflect.Method method, java.lang.Class targetClass, java.lang.Object[] args)
           
 void setParameterNames(java.lang.String[] names)
          Set the parameter names for the pointcut.
 void setParameterTypes(java.lang.Class[] types)
          Set the parameter types for the pointcut.
 void setPointcutDeclarationScope(java.lang.Class pointcutDeclarationScope)
          Set the declaration scope for the pointcut.
 java.lang.String toString()
           
 
Methods inherited from class org.springframework.aop.support.AbstractExpressionPointcut
getExpression, getLocation, onSetExpression, setExpression, setLocation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ConfluenceAspectJExpressionPointcut

public ConfluenceAspectJExpressionPointcut()
Create a new default ConfluenceAspectJExpressionPointcut using the current thread context classloader for class resolution during pointcut processing.


ConfluenceAspectJExpressionPointcut

public ConfluenceAspectJExpressionPointcut(java.lang.ClassLoader classLoader)
Create a new ConfluenceAspectJExpressionPointcut using the provided classloader for class resolution during pointcut match processing

Parameters:
classLoader - Classloader to use for class resolution during pointcut match processing

ConfluenceAspectJExpressionPointcut

public ConfluenceAspectJExpressionPointcut(java.util.Set supportedPrimitives,
                                           java.lang.ClassLoader classLoader)
Create a new AspectJExpressionPointcut with the given supported primitives.

Parameters:
supportedPrimitives - Set of PointcutPrimitive instances
classLoader - Classloader to use for class resolution during pointcut match processing

ConfluenceAspectJExpressionPointcut

public ConfluenceAspectJExpressionPointcut(java.lang.Class declarationScope,
                                           java.lang.String[] paramNames,
                                           java.lang.Class[] paramTypes)
Create a new AspectJExpressionPointcut with the given settings.

Parameters:
declarationScope - the declaration scope for the pointcut
paramNames - the parameter names for the pointcut
paramTypes - the parameter types for the pointcut
Method Detail

setPointcutDeclarationScope

public void setPointcutDeclarationScope(java.lang.Class pointcutDeclarationScope)
Set the declaration scope for the pointcut.


setParameterNames

public void setParameterNames(java.lang.String[] names)
Set the parameter names for the pointcut.


setParameterTypes

public void setParameterTypes(java.lang.Class[] types)
Set the parameter types for the pointcut.


getClassFilter

public org.springframework.aop.ClassFilter getClassFilter()
Specified by:
getClassFilter in interface org.springframework.aop.Pointcut

getMethodMatcher

public org.springframework.aop.MethodMatcher getMethodMatcher()
Specified by:
getMethodMatcher in interface org.springframework.aop.Pointcut

getPointcutExpression

public org.aspectj.weaver.tools.PointcutExpression getPointcutExpression()
Return the underlying AspectJ pointcut expression.


matches

public boolean matches(java.lang.Class targetClass)
Specified by:
matches in interface org.springframework.aop.ClassFilter

matches

public boolean matches(java.lang.reflect.Method method,
                       java.lang.Class targetClass,
                       boolean beanHasIntroductions)
Specified by:
matches in interface org.springframework.aop.IntroductionAwareMethodMatcher

matches

public boolean matches(java.lang.reflect.Method method,
                       java.lang.Class targetClass)
Specified by:
matches in interface org.springframework.aop.MethodMatcher

isRuntime

public boolean isRuntime()
Specified by:
isRuntime in interface org.springframework.aop.MethodMatcher

matches

public boolean matches(java.lang.reflect.Method method,
                       java.lang.Class targetClass,
                       java.lang.Object[] args)
Specified by:
matches in interface org.springframework.aop.MethodMatcher

equals

public boolean equals(java.lang.Object other)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2003-2014 Atlassian. All Rights Reserved.