Search in sources :

Example 1 with AnnotationExpr

use of dyvilx.tools.compiler.ast.expression.AnnotationExpr in project Dyvil by Dyvil.

the class AnnotationReader method visitAnnotation.

@Override
public AnnotationVisitor visitAnnotation(String key, String desc) {
    Annotation annotation = new ExternalAnnotation(ClassFormat.extendedToType(desc));
    AnnotationExpr value = new AnnotationExpr(annotation);
    this.arguments.add(Name.fromRaw(key), value);
    return new AnnotationReader(value, annotation);
}
Also used : ExternalAnnotation(dyvilx.tools.compiler.ast.attribute.annotation.ExternalAnnotation) AnnotationExpr(dyvilx.tools.compiler.ast.expression.AnnotationExpr) Annotation(dyvilx.tools.compiler.ast.attribute.annotation.Annotation) ExternalAnnotation(dyvilx.tools.compiler.ast.attribute.annotation.ExternalAnnotation)

Example 2 with AnnotationExpr

use of dyvilx.tools.compiler.ast.expression.AnnotationExpr in project Dyvil by Dyvil.

the class AnnotationValueReader method visitAnnotation.

@Override
public AnnotationVisitor visitAnnotation(String key, String desc) {
    Annotation annotation = new ExternalAnnotation(ClassFormat.extendedToType(desc));
    AnnotationExpr value = new AnnotationExpr(annotation);
    this.consumer.setValue(value);
    return new AnnotationReader(value, annotation);
}
Also used : ExternalAnnotation(dyvilx.tools.compiler.ast.attribute.annotation.ExternalAnnotation) AnnotationExpr(dyvilx.tools.compiler.ast.expression.AnnotationExpr) Annotation(dyvilx.tools.compiler.ast.attribute.annotation.Annotation) ExternalAnnotation(dyvilx.tools.compiler.ast.attribute.annotation.ExternalAnnotation)

Example 3 with AnnotationExpr

use of dyvilx.tools.compiler.ast.expression.AnnotationExpr in project Dyvil by Dyvil.

the class ValueAnnotationVisitor method visitAnnotation.

@Override
public AnnotationVisitor visitAnnotation(String name, String desc) {
    Annotation annotation = new ExternalAnnotation(ClassFormat.extendedToType(desc));
    AnnotationExpr value = new AnnotationExpr(annotation);
    this.consumer.setValue(value);
    return new AnnotationReader(value, annotation);
}
Also used : ExternalAnnotation(dyvilx.tools.compiler.ast.attribute.annotation.ExternalAnnotation) AnnotationExpr(dyvilx.tools.compiler.ast.expression.AnnotationExpr) Annotation(dyvilx.tools.compiler.ast.attribute.annotation.Annotation) ExternalAnnotation(dyvilx.tools.compiler.ast.attribute.annotation.ExternalAnnotation)

Aggregations

Annotation (dyvilx.tools.compiler.ast.attribute.annotation.Annotation)3 ExternalAnnotation (dyvilx.tools.compiler.ast.attribute.annotation.ExternalAnnotation)3 AnnotationExpr (dyvilx.tools.compiler.ast.expression.AnnotationExpr)3