public abstract class AbstractAspectJAdvisorFactory extends Object implements AspectJAdvisorFactory
This class handles annotation parsing and validation functionality. It does not actually generate Spring AOP Advisors, which is deferred to subclasses.
| Modifier and Type | Class and Description |
|---|---|
protected static class |
AbstractAspectJAdvisorFactory.AspectJAnnotation<A extends Annotation>
Class modeling an AspectJ annotation, exposing its type enumeration and
pointcut String.
|
protected static class |
AbstractAspectJAdvisorFactory.AspectJAnnotationType
Enum for AspectJ annotation types.
|
| Modifier and Type | Field and Description |
|---|---|
protected Log |
logger
Logger available to subclasses.
|
protected org.springframework.core.ParameterNameDiscoverer |
parameterNameDiscoverer |
| Constructor and Description |
|---|
AbstractAspectJAdvisorFactory() |
| Modifier and Type | Method and Description |
|---|---|
protected static AbstractAspectJAdvisorFactory.AspectJAnnotation<?> |
findAspectJAnnotationOnMethod(Method method)
Find and return the first AspectJ annotation on the given method
(there should only be one anyway...).
|
boolean |
isAspect(Class<?> clazz)
Determine whether the given class is an aspect, as reported
by AspectJ's
AjTypeSystem. |
void |
validate(Class<?> aspectClass)
Is the given class a valid AspectJ aspect class?
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetAdvice, getAdvisor, getAdvisorsprotected final Log logger
protected final org.springframework.core.ParameterNameDiscoverer parameterNameDiscoverer
public boolean isAspect(Class<?> clazz)
AspectJAdvisorFactoryAjTypeSystem.
Will simply return false if the supposed aspect is
invalid (such as an extension of a concrete aspect class).
Will return true for some aspects that Spring AOP cannot process,
such as those with unsupported instantiation models.
Use the AspectJAdvisorFactory.validate(java.lang.Class<?>) method to handle these cases if necessary.
isAspect in interface AspectJAdvisorFactoryclazz - the supposed annotation-style AspectJ classpublic void validate(Class<?> aspectClass) throws AopConfigException
AspectJAdvisorFactoryvalidate in interface AspectJAdvisorFactoryaspectClass - the supposed AspectJ annotation-style class to validateAopConfigException - if the class is an invalid aspect
(which can never be legal)NotAnAtAspectException - if the class is not an aspect at all
(which may or may not be legal, depending on the context)@Nullable protected static AbstractAspectJAdvisorFactory.AspectJAnnotation<?> findAspectJAnnotationOnMethod(Method method)