org.codehaus.aspectwerkz.annotation
Class AnnotationManager

java.lang.Object
  extended byorg.codehaus.aspectwerkz.annotation.AnnotationManager

public class AnnotationManager
extends Object

Parses and retrieves annotations.

Author:
Jonas Bonér , Alexandre Vasseur

Constructor Summary
AnnotationManager(ClassLoader loader)
          Constructs a new annotation manager and had the given ClassLoader to the search path
 
Method Summary
 void addSource(String srcFile)
          Adds a source file.
 void addSourceTrees(String[] srcDirs)
          Adds a source tree to the builder.
 com.thoughtworks.qdox.model.JavaClass[] getAllClasses()
          Returns all classes.
 Annotation[] getAnnotations(String name, com.thoughtworks.qdox.model.JavaClass clazz)
          Returns the annotations with a specific name for a specific class.
 Annotation[] getAnnotations(String name, com.thoughtworks.qdox.model.JavaField field)
          Returns the annotations with a specific name for a specific field.
 Annotation[] getAnnotations(String name, com.thoughtworks.qdox.model.JavaMethod method)
          Returns the annotations with a specific name for a specific method.
 void registerAnnotationProxy(Class proxyClass, String annotationName)
          Register an annotation together with its proxy implementation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationManager

public AnnotationManager(ClassLoader loader)
Constructs a new annotation manager and had the given ClassLoader to the search path

Parameters:
loader -
Method Detail

addSourceTrees

public void addSourceTrees(String[] srcDirs)
Adds a source tree to the builder.

Parameters:
srcDirs - the source trees

addSource

public void addSource(String srcFile)
Adds a source file.

Parameters:
srcFile - the source file

registerAnnotationProxy

public void registerAnnotationProxy(Class proxyClass,
                                    String annotationName)
Register an annotation together with its proxy implementation.

Parameters:
proxyClass - the proxy class
annotationName - the name of the annotation

getAllClasses

public com.thoughtworks.qdox.model.JavaClass[] getAllClasses()
Returns all classes.

Returns:
an array with all classes

getAnnotations

public Annotation[] getAnnotations(String name,
                                   com.thoughtworks.qdox.model.JavaClass clazz)
Returns the annotations with a specific name for a specific class.

Parameters:
name -
clazz -
Returns:
an array with the annotations

getAnnotations

public Annotation[] getAnnotations(String name,
                                   com.thoughtworks.qdox.model.JavaMethod method)
Returns the annotations with a specific name for a specific method.

Parameters:
name -
method -
Returns:
an array with the annotations

getAnnotations

public Annotation[] getAnnotations(String name,
                                   com.thoughtworks.qdox.model.JavaField field)
Returns the annotations with a specific name for a specific field.

Parameters:
name -
field -
Returns:
an array with the annotations


Copyright © 2002-2004 Jonas Bonér, Alexandre Vasseur. All Rights Reserved.