jodd.proxetta.pointcuts
Class ProxyPointcutSupport

java.lang.Object
  extended by jodd.proxetta.pointcuts.ProxyPointcutSupport
All Implemented Interfaces:
ProxyPointcut
Direct Known Subclasses:
AllGettersPointcut, AllMethodsPointcut, AllSettersPointcut, AllTopMethodsPointcut, MethodAnnotationPointcut

public abstract class ProxyPointcutSupport
extends java.lang.Object
implements ProxyPointcut

ProxyPointcut support methods.


Constructor Summary
ProxyPointcutSupport()
           
 
Method Summary
 boolean and(MethodInfo methodInfo, ProxyPointcut p1, ProxyPointcut p2)
          Returns true if both pointcuts can be applied on the method..
 AnnotationInfo getAnnotation(ClassInfo classInfo, java.lang.Class<? extends java.lang.annotation.Annotation> an)
          Finds annotation in class info.
 AnnotationInfo getAnnotation(MethodInfo methodInfo, java.lang.Class<? extends java.lang.annotation.Annotation> mi)
          Returns true if method is annotated with provided annotation.
 boolean hasAnnotation(ClassInfo classInfo, java.lang.Class<? extends java.lang.annotation.Annotation>... an)
          Returns true if class is annotated with one of provided annotation.
 boolean hasAnnotation(MethodInfo methodInfo, java.lang.Class<? extends java.lang.annotation.Annotation>... an)
          Returns true if method is annotated with one of provided annotation.
 boolean hasNoArguments(MethodInfo methodInfo)
          Returns true if method has no arguments.
 boolean hasNoReturnValue(MethodInfo methodInfo)
          Returns true if method's return type is void.
 boolean hasOneArgument(MethodInfo methodInfo)
          Returns true if method has only one argument.
 boolean hasReturnValue(MethodInfo methodInfo)
          Returns true if method has a return type.
 boolean isPublic(MethodInfo methodInfo)
          Returns true if method is public.
 boolean isRootMethod(MethodInfo methodInfo)
          Returns true if method is declared in Object class (root class).
 boolean isSpecialMethod(MethodInfo methodInfo)
          Returns true if method is constructor or static block.
 boolean isTopLevelMethod(MethodInfo methodInfo)
          Returns true if method is a top-level method.
 boolean matchClassName(MethodInfo methodInfo, java.lang.String wildcard)
          Match class name to provided Wildcard pattern.
 boolean matchMethodName(MethodInfo methodInfo, java.lang.String wildcard)
          Match method name to provided Wildcard pattern.
 boolean or(MethodInfo methodInfo, ProxyPointcut p1, ProxyPointcut p2)
          Returns true if at least one pointcuts can be applied on the method..
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface jodd.proxetta.ProxyPointcut
apply
 

Constructor Detail

ProxyPointcutSupport

public ProxyPointcutSupport()
Method Detail

isPublic

public boolean isPublic(MethodInfo methodInfo)
Returns true if method is public.


getAnnotation

public AnnotationInfo getAnnotation(MethodInfo methodInfo,
                                    java.lang.Class<? extends java.lang.annotation.Annotation> mi)
Returns true if method is annotated with provided annotation.


hasAnnotation

public boolean hasAnnotation(MethodInfo methodInfo,
                             java.lang.Class<? extends java.lang.annotation.Annotation>... an)
Returns true if method is annotated with one of provided annotation.


getAnnotation

public AnnotationInfo getAnnotation(ClassInfo classInfo,
                                    java.lang.Class<? extends java.lang.annotation.Annotation> an)
Finds annotation in class info. Returns null if annotation doesn't exist.


hasAnnotation

public boolean hasAnnotation(ClassInfo classInfo,
                             java.lang.Class<? extends java.lang.annotation.Annotation>... an)
Returns true if class is annotated with one of provided annotation.


hasNoArguments

public boolean hasNoArguments(MethodInfo methodInfo)
Returns true if method has no arguments.


hasOneArgument

public boolean hasOneArgument(MethodInfo methodInfo)
Returns true if method has only one argument.


isTopLevelMethod

public boolean isTopLevelMethod(MethodInfo methodInfo)
Returns true if method is a top-level method.


isRootMethod

public boolean isRootMethod(MethodInfo methodInfo)
Returns true if method is declared in Object class (root class).


isSpecialMethod

public boolean isSpecialMethod(MethodInfo methodInfo)
Returns true if method is constructor or static block.


matchMethodName

public boolean matchMethodName(MethodInfo methodInfo,
                               java.lang.String wildcard)
Match method name to provided Wildcard pattern.


matchClassName

public boolean matchClassName(MethodInfo methodInfo,
                              java.lang.String wildcard)
Match class name to provided Wildcard pattern.


hasNoReturnValue

public boolean hasNoReturnValue(MethodInfo methodInfo)
Returns true if method's return type is void.


hasReturnValue

public boolean hasReturnValue(MethodInfo methodInfo)
Returns true if method has a return type.


and

public boolean and(MethodInfo methodInfo,
                   ProxyPointcut p1,
                   ProxyPointcut p2)
Returns true if both pointcuts can be applied on the method..


or

public boolean or(MethodInfo methodInfo,
                  ProxyPointcut p1,
                  ProxyPointcut p2)
Returns true if at least one pointcuts can be applied on the method..



Copyright © 2003-2012 Jodd Team