Package adams.core.annotation
Class AnnotationHelper
- java.lang.Object
-
- adams.core.annotation.AnnotationHelper
-
public class AnnotationHelper extends Object
Helper class around annotations.- Author:
- FracPete (fracpete at waikato dot ac dot nz)
-
-
Constructor Summary
Constructors Constructor Description AnnotationHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getDeprecationWarning(Class cls)
Generates a deprecation warning if the class is marked as such.static boolean
hasAnnotation(Class cls, Class annotation)
Returns whether the class has the specified annotation.static boolean
isDeprecated(Class cls)
Returns whether the class is marked as deprecated (Deprecated
orDeprecatedClass
).
-
-
-
Method Detail
-
hasAnnotation
public static boolean hasAnnotation(Class cls, Class annotation)
Returns whether the class has the specified annotation.- Parameters:
cls
- the class to check for annotationannotation
- the annotation to look for- Returns:
- true if annotation is present
-
isDeprecated
public static boolean isDeprecated(Class cls)
Returns whether the class is marked as deprecated (Deprecated
orDeprecatedClass
).- Parameters:
cls
- the class to check- Returns:
- true if marked as deprecated
-
-