Class Annotation
java.lang.Object
edu.university.ecs.lab.common.models.ir.Node
edu.university.ecs.lab.common.models.ir.Annotation
- All Implemented Interfaces:
JsonSerializable
Represents an annotation in Java
-
Field Summary
Fields inherited from class edu.university.ecs.lab.common.models.ir.Node
name, packageAndClassName
-
Constructor Summary
ConstructorDescriptionAnnotation
(com.github.javaparser.ast.expr.AnnotationExpr annotationExpr, String packageAndClassName) -
Method Summary
Modifier and TypeMethodDescriptionGet contents of annotation objectparseAttributes
(com.github.javaparser.ast.expr.AnnotationExpr annotationExpr) Map attributes from annotation expressioncom.google.gson.JsonObject
-
Field Details
-
attributes
-
-
Constructor Details
-
Annotation
public Annotation(com.github.javaparser.ast.expr.AnnotationExpr annotationExpr, String packageAndClassName) -
Annotation
-
-
Method Details
-
getContents
Get contents of annotation object- Returns:
- comma-delimmited list of annotation content key-value pairs
-
toJsonObject
public com.google.gson.JsonObject toJsonObject()- Returns:
- a JsonObject representing this
-
parseAttributes
private static HashMap<String,String> parseAttributes(com.github.javaparser.ast.expr.AnnotationExpr annotationExpr) Map attributes from annotation expression- Parameters:
annotationExpr
- annotation expression object to parse- Returns:
- map of annotation attributes and their values
-