Package net.binis.codegen.compiler.utils
Class ElementAnnotationUtils
java.lang.Object
net.binis.codegen.compiler.utils.ElementUtils
net.binis.codegen.compiler.utils.ElementAnnotationUtils
-
Field Summary
Fields inherited from class net.binis.codegen.compiler.utils.ElementUtils
CLASS_MAP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic CGAnnotationaddAnnotation(Element element, Class<? extends Annotation> annotation) static CGAnnotationaddAnnotation(Element element, Class<? extends Annotation> annotation, Map<String, Object> attributes) static CGAnnotationaddAnnotation(Element element, Class<? extends Annotation> annotation, CGExpression... attributes) static CGAnnotationaddAnnotation(Element element, Class<? extends Annotation> annotation, CGList<CGExpression> attributes) static CGAnnotationaddAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, Map<String, Object> attributes) static CGAnnotationaddAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, CGExpression... attributes) static CGAnnotationaddAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, CGList<CGExpression> attributes) static voidaddAnnotationAttribute(Element element, Class<? extends Annotation> annotation, String name, Object value) static voidaddAnnotationAttribute(CGAnnotation annotation, String name, Object value) static voidaddAnnotationAttribute(CGDeclaration declaration, Class<? extends Annotation> annotation, String name, Object value) static voidaddIfMissingAnnotationAttribute(CGAnnotation annotation, String name, Object value) static CGAnnotationaddOrReplaceAnnotation(Element element, Class<? extends Annotation> annotation) static CGAnnotationaddOrReplaceAnnotation(Element element, Class<? extends Annotation> annotation, Map<String, Object> attributes) static CGAnnotationaddOrReplaceAnnotation(Element element, Class<? extends Annotation> annotation, CGExpression... attributes) static CGAnnotationaddOrReplaceAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation) static CGAnnotationaddOrReplaceAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, Map<String, Object> attributes) static CGAnnotationaddOrReplaceAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, CGExpression... attributes) static CGAnnotationcreateAnnotation(Class<? extends Annotation> annotation, Map<String, Object> attributes) protected static CGList<CGExpression>expressionToList(CGExpression... expressions) static CGAnnotationfindAnnotation(Element element, Class<? extends Annotation> annotation) static CGAnnotationfindAnnotation(Element element, Predicate<CGAnnotation> filter) static CGAnnotationfindAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation) static CGAnnotationfindAnnotation(CGDeclaration declaration, Predicate<CGAnnotation> filter) static List<CGAnnotation>findAnnotations(Element element, Predicate<CGAnnotation> filter) static List<CGAnnotation>findAnnotations(CGDeclaration declaration, Predicate<CGAnnotation> filter) static CGAnnotationgetAnnotation(Element element, Class<? extends Annotation> annotation) static CGAnnotationgetAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation) static CGAnnotationremoveAnnotation(Element element, Class<? extends Annotation> annotation) static CGAnnotationremoveAnnotation(Element element, CGAnnotation annotation) static CGAnnotationremoveAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation) static CGAnnotationremoveAnnotation(CGDeclaration declaration, CGAnnotation annotation) static voidremoveAnnotationAttribute(Element element, Class<? extends Annotation> annotation, String name) static voidremoveAnnotationAttribute(CGAnnotation annotation, String name) static voidremoveAnnotationAttribute(CGDeclaration declaration, Class<? extends Annotation> annotation, String name) static CGAnnotationreplaceAnnotation(Element element, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation, Map<String, Object> attributes) static CGAnnotationreplaceAnnotation(Element element, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation, CGExpression... attributes) static CGAnnotationreplaceAnnotation(CGDeclaration declaration, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation, Map<String, Object> attributes) static CGAnnotationreplaceAnnotation(CGDeclaration declaration, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation, CGExpression... attributes) static voidreplaceAnnotationAttribute(Element element, Class<? extends Annotation> annotation, String name, Object value) static voidreplaceAnnotationAttribute(CGAnnotation annotation, String name, Object value) static voidreplaceAnnotationAttribute(CGDeclaration declaration, Class<? extends Annotation> annotation, String name, Object value) static CGAnnotationreplaceAnnotationWithAttributes(Element element, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation) static CGAnnotationreplaceAnnotationWithAttributes(CGDeclaration declaration, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation) Methods inherited from class net.binis.codegen.compiler.utils.ElementUtils
calcExpression, chainDots, chainDots, chainDots, chainDotsString, chainDotsString, classToExpression, cloneType, createFieldAccess, getDeclaration, getDeclaration, getSymbolFullName, init, initClassMap, primitiveTypeTag, registerClass, selfType, toType
-
Constructor Details
-
ElementAnnotationUtils
public ElementAnnotationUtils()
-
-
Method Details
-
findAnnotation
-
findAnnotation
public static CGAnnotation findAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation) -
findAnnotation
-
findAnnotation
public static CGAnnotation findAnnotation(CGDeclaration declaration, Predicate<CGAnnotation> filter) -
findAnnotations
-
findAnnotations
public static List<CGAnnotation> findAnnotations(CGDeclaration declaration, Predicate<CGAnnotation> filter) -
createAnnotation
public static CGAnnotation createAnnotation(Class<? extends Annotation> annotation, Map<String, Object> attributes) -
addAnnotation
-
addAnnotation
public static CGAnnotation addAnnotation(Element element, Class<? extends Annotation> annotation, Map<String, Object> attributes) -
addAnnotation
public static CGAnnotation addAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, Map<String, Object> attributes) -
addAnnotation
public static CGAnnotation addAnnotation(Element element, Class<? extends Annotation> annotation, CGList<CGExpression> attributes) -
addAnnotation
public static CGAnnotation addAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, CGList<CGExpression> attributes) -
addAnnotation
public static CGAnnotation addAnnotation(Element element, Class<? extends Annotation> annotation, CGExpression... attributes) -
addAnnotation
public static CGAnnotation addAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, CGExpression... attributes) -
addOrReplaceAnnotation
public static CGAnnotation addOrReplaceAnnotation(Element element, Class<? extends Annotation> annotation) -
addOrReplaceAnnotation
public static CGAnnotation addOrReplaceAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation) -
addOrReplaceAnnotation
public static CGAnnotation addOrReplaceAnnotation(Element element, Class<? extends Annotation> annotation, Map<String, Object> attributes) -
addOrReplaceAnnotation
public static CGAnnotation addOrReplaceAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, Map<String, Object> attributes) -
addOrReplaceAnnotation
public static CGAnnotation addOrReplaceAnnotation(Element element, Class<? extends Annotation> annotation, CGExpression... attributes) -
addOrReplaceAnnotation
public static CGAnnotation addOrReplaceAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation, CGExpression... attributes) -
getAnnotation
-
getAnnotation
public static CGAnnotation getAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation) -
replaceAnnotation
public static CGAnnotation replaceAnnotation(Element element, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation, Map<String, Object> attributes) -
replaceAnnotation
public static CGAnnotation replaceAnnotation(CGDeclaration declaration, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation, Map<String, Object> attributes) -
replaceAnnotation
public static CGAnnotation replaceAnnotation(Element element, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation, CGExpression... attributes) -
replaceAnnotation
public static CGAnnotation replaceAnnotation(CGDeclaration declaration, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation, CGExpression... attributes) -
replaceAnnotationWithAttributes
public static CGAnnotation replaceAnnotationWithAttributes(Element element, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation) -
replaceAnnotationWithAttributes
public static CGAnnotation replaceAnnotationWithAttributes(CGDeclaration declaration, CGAnnotation oldAnnotation, Class<? extends Annotation> annotation) -
removeAnnotation
public static CGAnnotation removeAnnotation(Element element, Class<? extends Annotation> annotation) -
removeAnnotation
public static CGAnnotation removeAnnotation(CGDeclaration declaration, Class<? extends Annotation> annotation) -
removeAnnotation
-
removeAnnotation
-
addAnnotationAttribute
public static void addAnnotationAttribute(Element element, Class<? extends Annotation> annotation, String name, Object value) -
addAnnotationAttribute
public static void addAnnotationAttribute(CGDeclaration declaration, Class<? extends Annotation> annotation, String name, Object value) -
addAnnotationAttribute
-
removeAnnotationAttribute
public static void removeAnnotationAttribute(Element element, Class<? extends Annotation> annotation, String name) -
removeAnnotationAttribute
public static void removeAnnotationAttribute(CGDeclaration declaration, Class<? extends Annotation> annotation, String name) -
removeAnnotationAttribute
-
replaceAnnotationAttribute
public static void replaceAnnotationAttribute(Element element, Class<? extends Annotation> annotation, String name, Object value) -
replaceAnnotationAttribute
public static void replaceAnnotationAttribute(CGDeclaration declaration, Class<? extends Annotation> annotation, String name, Object value) -
replaceAnnotationAttribute
-
addIfMissingAnnotationAttribute
public static void addIfMissingAnnotationAttribute(CGAnnotation annotation, String name, Object value) -
expressionToList
-