Package com.github.antlrjavaparser.api.expr

Examples of com.github.antlrjavaparser.api.expr.AnnotationExpr


        if (field.getCommentStructure() != null) {

            // if the field has annotations, add JavaDoc comments to the first
            // annotation
            if (annotations != null && annotations.size() > 0) {
                AnnotationExpr firstAnnotation = annotations.get(0);

                JavaParserCommentMetadataBuilder.updateCommentsToJavaParser(
                        firstAnnotation, field.getCommentStructure());

                // Otherwise, add comments to the field declaration line
View Full Code Here


            }
        }

        // Create the AnnotationExpr; it varies depending on how many
        // member-value pairs we need to present
        AnnotationExpr annotationExpression = null;
        if (memberValuePairs.isEmpty()) {
            annotationExpression = new MarkerAnnotationExpr(nameToUse);
        }
        else if (memberValuePairs.size() == 1
                && (memberValuePairs.get(0).getName() == null || "value"
View Full Code Here

    @SuppressWarnings("unchecked")
    private static MemberValuePair convert(
            final AnnotationAttributeValue<?> value) {
        if (value instanceof NestedAnnotationAttributeValue) {
            final NestedAnnotationAttributeValue castValue = (NestedAnnotationAttributeValue) value;
            AnnotationExpr annotationExpr;
            final AnnotationMetadata nestedAnnotation = castValue.getValue();
            if (castValue.getValue().getAttributeNames().size() == 0) {
                annotationExpr = new MarkerAnnotationExpr(
                        JavaParserUtils.getNameExpr(nestedAnnotation
                                .getAnnotationType()
View Full Code Here

        if (annotationName == null) {
            annotationName = new JavaSymbolName("__ARRAY_ELEMENT__");
        }

        if (expression instanceof AnnotationExpr) {
            final AnnotationExpr annotationExpr = (AnnotationExpr) expression;
            final AnnotationMetadata value = getInstance(annotationExpr,
                    compilationUnitServices).build();
            return new NestedAnnotationAttributeValue(annotationName, value);
        }
View Full Code Here

TOP

Related Classes of com.github.antlrjavaparser.api.expr.AnnotationExpr

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.