org.codehaus.backport175.compiler
Class AnnotationInterfaceRepository

java.lang.Object
  extended by org.codehaus.backport175.compiler.AnnotationInterfaceRepository

public class AnnotationInterfaceRepository
extends java.lang.Object

Manages the reader interface and their mappings to aliases (if there is an alias else the regular classname).

An 'alias' is a shorter name that can be used in the source code instead of the fully qualified name of the interface. These are defined in the external 'reader.properties' file, which needs fed to the compiler.

Author:
Jonas Bon?r

Constructor Summary
AnnotationInterfaceRepository(MessageHandler handler)
          Creates a new interface repository.
 
Method Summary
 java.lang.Class getAnnotationInterfaceFor(java.lang.String annotationName, java.lang.ClassLoader loader)
          Returns the annotation interface class for a specific annotation or NULL if the annotation name is unknown.
 java.util.Set getIgnoredDocletNames()
          Return the set of ignored doclet names - like f.e.
 void registerPropertiesFiles(java.lang.String[] propertiesFiles, java.lang.ClassLoader loader)
          Registers the annotation property files.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnnotationInterfaceRepository

public AnnotationInterfaceRepository(MessageHandler handler)
Creates a new interface repository.

Parameters:
handler -
Method Detail

registerPropertiesFiles

public void registerPropertiesFiles(java.lang.String[] propertiesFiles,
                                    java.lang.ClassLoader loader)
Registers the annotation property files.

Parameters:
propertiesFiles -
loader -

getAnnotationInterfaceFor

public java.lang.Class getAnnotationInterfaceFor(java.lang.String annotationName,
                                                 java.lang.ClassLoader loader)
Returns the annotation interface class for a specific annotation or NULL if the annotation name is unknown.

Hanldes nested class with either '$' or '.' ('$' is faster). Classes are added to the mapping map when found.

Parameters:
annotationName -
loader - the loader where to search for the class if not found in aliased ones
Returns:
the interface class for the annotation or NULL if the annotation name is unknown

getIgnoredDocletNames

public java.util.Set getIgnoredDocletNames()
Return the set of ignored doclet names - like f.e. "author" for "@author"

Returns: