net.java.ao
Class AnnotationDelegate

java.lang.Object
  extended by net.java.ao.AnnotationDelegate

public final class AnnotationDelegate
extends Object

WARNING: Not part of the public API. This class is public only to allow its use within other packages in the ActiveObjects library.


Constructor Summary
AnnotationDelegate(Method method1, Method method2)
           
 
Method Summary
<T extends Annotation>
T
getAnnotation(Class<T> annotationClass)
          Returns the annotation for the specified methods starting by method1.
 boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
          Returns true if an annotation for the specified type is present on any of the methods, else false.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationDelegate

public AnnotationDelegate(Method method1,
                          Method method2)
Method Detail

getAnnotation

public <T extends Annotation> T getAnnotation(Class<T> annotationClass)
Returns the annotation for the specified methods starting by method1.

Parameters:
annotationClass - the annotation type to look up
Returns:
this element's annotation for the specified annotation type if present on any of the methods, else null
See Also:
Method.getAnnotation(Class)

isAnnotationPresent

public boolean isAnnotationPresent(Class<? extends Annotation> annotationClass)
Returns true if an annotation for the specified type is present on any of the methods, else false. This method is designed primarily for convenient access to marker annotations.

Parameters:
annotationClass - the Class object corresponding to the annotation type
Returns:
true if an annotation for the specified annotation type is present on any of the methods, else false


Copyright © 2007-2014. All Rights Reserved.