Class AnnotationUtil
java.lang.Object
com.espertech.esper.common.internal.epl.annotation.AnnotationUtil
Utility to handle EPL statement annotations.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic 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 boolean
hasAnnotation
(Annotation[] annotations, Class<? extends Annotation> annotationClass) static CodegenExpression
makeAnnotations
(EPTypeClass arrayType, Annotation[] annotations, CodegenMethod parent, CodegenClassScope classScope) static Map<String,
List<AnnotationDesc>> mapByNameLowerCase
(List<AnnotationDesc> annotations) static Annotation[]
mergeAnnotations
(Annotation[] first, Annotation[] second)
-
Constructor Details
-
AnnotationUtil
public AnnotationUtil()
-
-
Method Details
-
mapByNameLowerCase
-
getValue
-
compileAnnotations
public static Annotation[] compileAnnotations(List<AnnotationDesc> annotationSpec, ClasspathImportServiceCompileTime classpathImportService, Compilable compilable) throws StatementSpecCompileException Compile annotation objects from descriptors.- Parameters:
annotationSpec
- spec for annotationsclasspathImportService
- importscompilable
- statement expression- Returns:
- annotations
- Throws:
StatementSpecCompileException
- compile exception
-
makeAnnotations
public static CodegenExpression makeAnnotations(EPTypeClass arrayType, Annotation[] annotations, CodegenMethod parent, CodegenClassScope classScope) -
hasAnnotation
public static boolean hasAnnotation(Annotation[] annotations, Class<? extends Annotation> annotationClass) -
findAnnotation
-
findAnnotations
-
mergeAnnotations
-
getExpectSingleStringValue
public static String getExpectSingleStringValue(String msgPrefix, List<AnnotationDesc> annotationsSameName) throws ExprValidationException - Throws:
ExprValidationException
-