public class AnnotationUtil extends Object
Constructor and Description |
---|
AnnotationUtil() |
Modifier and Type | Method and Description |
---|---|
static Annotation[] |
compileAnnotations(List<AnnotationDesc> annotationSpec,
ClasspathImportServiceCompileTime classpathImportService,
Compilable compilable)
Compile annotation objects from descriptors.
|
static Annotation |
findAnnotation(Annotation[] annotations,
Class annotationClass) |
static List<Annotation> |
findAnnotations(Annotation[] annotations,
Class annotationClass) |
static String |
getExpectSingleStringValue(String msgPrefix,
List<AnnotationDesc> annotationsSameName) |
static Object |
getValue(AnnotationDesc desc) |
static CodegenMethod |
makeAnnotations(Class arrayType,
Annotation[] annotations,
CodegenMethod parent,
CodegenClassScope classScope) |
static Map<String,List<AnnotationDesc>> |
mapByNameLowerCase(List<AnnotationDesc> annotations) |
static Annotation[] |
mergeAnnotations(Annotation[] first,
Annotation[] second) |
public static Map<String,List<AnnotationDesc>> mapByNameLowerCase(List<AnnotationDesc> annotations)
public static Object getValue(AnnotationDesc desc)
public static Annotation[] compileAnnotations(List<AnnotationDesc> annotationSpec, ClasspathImportServiceCompileTime classpathImportService, Compilable compilable) throws StatementSpecCompileException
annotationSpec
- spec for annotationsclasspathImportService
- importscompilable
- statement expressionStatementSpecCompileException
- compile exceptionpublic static CodegenMethod makeAnnotations(Class arrayType, Annotation[] annotations, CodegenMethod parent, CodegenClassScope classScope)
public static Annotation findAnnotation(Annotation[] annotations, Class annotationClass)
public static List<Annotation> findAnnotations(Annotation[] annotations, Class annotationClass)
public static Annotation[] mergeAnnotations(Annotation[] first, Annotation[] second)
public static String getExpectSingleStringValue(String msgPrefix, List<AnnotationDesc> annotationsSameName) throws ExprValidationException
ExprValidationException
Copyright © 2005–2018. All rights reserved.