public class UnitsAnnotationClassLoader extends AnnotationClassLoader
checker, classLoader, processingEnv
Constructor and Description |
---|
UnitsAnnotationClassLoader(BaseTypeChecker checker) |
Modifier and Type | Method and Description |
---|---|
protected boolean |
isSupportedAnnotationClass(Class<? extends Annotation> annoClass)
Custom filter for units annotations:
|
close, getBundledAnnotationClasses, hasWellDefinedTargetMetaAnnotation, loadAnnotationClass, loadAnnotationClasses, loadExternalAnnotationClass, loadExternalAnnotationClassesFromDirectory, printPaths
public UnitsAnnotationClassLoader(BaseTypeChecker checker)
protected boolean isSupportedAnnotationClass(Class<? extends Annotation> annoClass)
This filter will ignore (by returning false) any units annotation which is an alias of
another base unit annotation (identified via UnitsMultiple
meta-annotation). Alias
annotations can still be used in source code; they are converted into a base annotation by
UnitsAnnotatedTypeFactory.canonicalAnnotation(AnnotationMirror)
. This filter simply
makes sure that the alias annotations themselves don't become part of the type hierarchy as
their base annotations already are in the hierarchy.
isSupportedAnnotationClass
in class AnnotationClassLoader
annoClass
- an annotation class