com.almende.util
Class AnnotationUtil.AnnotatedClass

java.lang.Object
  extended by com.almende.util.AnnotationUtil.AnnotatedClass
Enclosing class:
AnnotationUtil

public static class AnnotationUtil.AnnotatedClass
extends Object

AnnotatedClass describes a class, its annotations, and its methods.


Constructor Summary
AnnotationUtil.AnnotatedClass(Class<?> clazz, boolean includeObject)
          Create a new AnnotatedClass
 
Method Summary
 Class<?> getActualClass()
          Get the actual Java class described by this AnnotatedClass.
<T> T
getAnnotation(Class<T> type)
          Get an annotation of this class by type.
 List<Annotation> getAnnotations()
          Get all annotations defined on this class, its superclasses, and its interfaces
 List<AnnotationUtil.AnnotatedMethod> getMethods()
          Get all methods including methods declared in superclasses.
 List<AnnotationUtil.AnnotatedMethod> getMethods(String name)
          Get all methods including methods declared in superclasses, filtered by name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationUtil.AnnotatedClass

public AnnotationUtil.AnnotatedClass(Class<?> clazz,
                                     boolean includeObject)
Create a new AnnotatedClass

Parameters:
clazz -
includeObject - If true, the methods of super class java.lang.Object will be included too.
Method Detail

getActualClass

public Class<?> getActualClass()
Get the actual Java class described by this AnnotatedClass.

Returns:
clazz

getMethods

public List<AnnotationUtil.AnnotatedMethod> getMethods()
Get all methods including methods declared in superclasses.

Returns:
methods

getMethods

public List<AnnotationUtil.AnnotatedMethod> getMethods(String name)
Get all methods including methods declared in superclasses, filtered by name

Parameters:
name -
Returns:
filteredMethods

getAnnotations

public List<Annotation> getAnnotations()
Get all annotations defined on this class, its superclasses, and its interfaces

Returns:
annotations

getAnnotation

public <T> T getAnnotation(Class<T> type)
Get an annotation of this class by type. Returns null if not available.

Parameters:
annotationClass -
Returns:
annotation


Copyright © 2013 Almende BV. All Rights Reserved.