Class UnitsAnnotationClassLoader
- java.lang.Object
 - 
- org.checkerframework.framework.type.AnnotationClassLoader
 - 
- org.checkerframework.checker.units.UnitsAnnotationClassLoader
 
 
 
- 
- All Implemented Interfaces:
 java.io.Closeable,java.lang.AutoCloseable
public class UnitsAnnotationClassLoader extends AnnotationClassLoader
 
- 
- 
Field Summary
- 
Fields inherited from class org.checkerframework.framework.type.AnnotationClassLoader
checker, classLoader, processingEnv 
 - 
 
- 
Constructor Summary
Constructors Constructor Description UnitsAnnotationClassLoader(BaseTypeChecker checker) 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanisSupportedAnnotationClass(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)Custom filter for units annotations:- 
Methods inherited from class org.checkerframework.framework.type.AnnotationClassLoader
close, getBundledAnnotationClasses, hasWellDefinedTargetMetaAnnotation, loadAnnotationClass, loadAnnotationClasses, loadExternalAnnotationClass, loadExternalAnnotationClassesFromDirectory, printPaths 
 - 
 
 - 
 
- 
- 
Constructor Detail
- 
UnitsAnnotationClassLoader
public UnitsAnnotationClassLoader(BaseTypeChecker checker)
 
 - 
 
- 
Method Detail
- 
isSupportedAnnotationClass
protected boolean isSupportedAnnotationClass(java.lang.Class<? extends java.lang.annotation.Annotation> annoClass)
Custom filter for units annotations:This filter will ignore (by returning false) any units annotation which is an alias of another base unit annotation (identified via
UnitsMultiplemeta-annotation). Alias annotations can still be used in source code; they are converted into a base annotation byUnitsAnnotatedTypeFactory.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.- Overrides:
 isSupportedAnnotationClassin classAnnotationClassLoader- Parameters:
 annoClass- an annotation class- Returns:
 - true if the annotation is supported, false if it isn't
 
 
 - 
 
 -