Search in sources :

Example 1 with ClassExpr

use of com.github.antlrjavaparser.api.expr.ClassExpr in project spring-roo by spring-projects.

the class JavaParserAnnotationMetadataBuilder method convert.

private AnnotationAttributeValue<?> convert(JavaSymbolName annotationName, final Expression expression, final CompilationUnitServices compilationUnitServices) {
    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);
    }
    if (expression instanceof BooleanLiteralExpr) {
        final boolean value = ((BooleanLiteralExpr) expression).getValue();
        return new BooleanAttributeValue(annotationName, value);
    }
    if (expression instanceof CharLiteralExpr) {
        final String value = ((CharLiteralExpr) expression).getValue();
        Validate.isTrue(value.length() == 1, "Expected a char expression, but instead received '%s' for attribute '%s'", value, annotationName);
        final char c = value.charAt(0);
        return new CharAttributeValue(annotationName, c);
    }
    if (expression instanceof LongLiteralExpr) {
        String value = ((LongLiteralExpr) expression).getValue();
        Validate.isTrue(value.toUpperCase().endsWith("L"), "Expected long literal expression '%s' to end in 'l' or 'L'", value);
        value = value.substring(0, value.length() - 1);
        final long l = new Long(value);
        return new LongAttributeValue(annotationName, l);
    }
    if (expression instanceof IntegerLiteralExpr) {
        final String value = ((IntegerLiteralExpr) expression).getValue();
        final int i = new Integer(value);
        return new IntegerAttributeValue(annotationName, i);
    }
    if (expression instanceof DoubleLiteralExpr) {
        String value = ((DoubleLiteralExpr) expression).getValue();
        boolean floatingPrecisionOnly = false;
        if (value.toUpperCase().endsWith("F")) {
            value = value.substring(0, value.length() - 1);
            floatingPrecisionOnly = true;
        }
        if (value.toUpperCase().endsWith("D")) {
            value = value.substring(0, value.length() - 1);
        }
        final double d = new Double(value);
        return new DoubleAttributeValue(annotationName, d, floatingPrecisionOnly);
    }
    if (expression instanceof BinaryExpr) {
        String result = "";
        BinaryExpr current = (BinaryExpr) expression;
        while (current != null) {
            String right = "";
            if (current.getRight() instanceof StringLiteralExpr) {
                right = ((StringLiteralExpr) current.getRight()).getValue();
            } else if (current.getRight() instanceof NameExpr) {
                right = ((NameExpr) current.getRight()).getName();
            }
            result = right + result;
            if (current.getLeft() instanceof StringLiteralExpr) {
                final String left = ((StringLiteralExpr) current.getLeft()).getValue();
                result = left + result;
            }
            if (current.getLeft() instanceof BinaryExpr) {
                current = (BinaryExpr) current.getLeft();
            } else {
                current = null;
            }
        }
        return new StringAttributeValue(annotationName, result);
    }
    if (expression instanceof StringLiteralExpr) {
        final String value = ((StringLiteralExpr) expression).getValue();
        return new StringAttributeValue(annotationName, value);
    }
    if (expression instanceof FieldAccessExpr) {
        final FieldAccessExpr field = (FieldAccessExpr) expression;
        final String fieldName = field.getField();
        // Determine the type
        final Expression scope = field.getScope();
        NameExpr nameToFind = null;
        if (scope instanceof FieldAccessExpr) {
            final FieldAccessExpr fScope = (FieldAccessExpr) scope;
            nameToFind = JavaParserUtils.getNameExpr(fScope.toString());
        } else if (scope instanceof NameExpr) {
            nameToFind = (NameExpr) scope;
        } else {
            throw new UnsupportedOperationException("A FieldAccessExpr for '" + field.getScope() + "' should return a NameExpr or FieldAccessExpr (was " + field.getScope().getClass().getName() + ")");
        }
        final JavaType fieldType = JavaParserUtils.getJavaType(compilationUnitServices, nameToFind, null);
        final EnumDetails enumDetails = new EnumDetails(fieldType, new JavaSymbolName(fieldName));
        return new EnumAttributeValue(annotationName, enumDetails);
    }
    if (expression instanceof NameExpr) {
        final NameExpr field = (NameExpr) expression;
        final String name = field.getName();
        // As we have no way of finding out the real type
        final JavaType fieldType = new JavaType("unknown.Object");
        final EnumDetails enumDetails = new EnumDetails(fieldType, new JavaSymbolName(name));
        return new EnumAttributeValue(annotationName, enumDetails);
    }
    if (expression instanceof ClassExpr) {
        final ClassExpr clazz = (ClassExpr) expression;
        final Type nameToFind = clazz.getType();
        final JavaType javaType = JavaParserUtils.getJavaType(compilationUnitServices, nameToFind, null);
        return new ClassAttributeValue(annotationName, javaType);
    }
    if (expression instanceof ArrayInitializerExpr) {
        final ArrayInitializerExpr castExp = (ArrayInitializerExpr) expression;
        final List<AnnotationAttributeValue<?>> arrayElements = new ArrayList<AnnotationAttributeValue<?>>();
        for (final Expression e : castExp.getValues()) {
            arrayElements.add(convert(null, e, compilationUnitServices));
        }
        return new ArrayAttributeValue<AnnotationAttributeValue<?>>(annotationName, arrayElements);
    }
    if (expression instanceof UnaryExpr) {
        final UnaryExpr castExp = (UnaryExpr) expression;
        if (castExp.getOperator() == Operator.negative) {
            String value = castExp.toString();
            value = value.toUpperCase().endsWith("L") ? value.substring(0, value.length() - 1) : value;
            final long l = new Long(value);
            return new LongAttributeValue(annotationName, l);
        } else {
            throw new UnsupportedOperationException("Only negative operator in UnaryExpr is supported");
        }
    }
    throw new UnsupportedOperationException("Unable to parse annotation attribute '" + annotationName + "' due to unsupported annotation expression '" + expression.getClass().getName() + "'");
}
Also used : IntegerLiteralExpr(com.github.antlrjavaparser.api.expr.IntegerLiteralExpr) ClassAttributeValue(org.springframework.roo.classpath.details.annotations.ClassAttributeValue) AnnotationExpr(com.github.antlrjavaparser.api.expr.AnnotationExpr) MarkerAnnotationExpr(com.github.antlrjavaparser.api.expr.MarkerAnnotationExpr) SingleMemberAnnotationExpr(com.github.antlrjavaparser.api.expr.SingleMemberAnnotationExpr) NormalAnnotationExpr(com.github.antlrjavaparser.api.expr.NormalAnnotationExpr) DoubleAttributeValue(org.springframework.roo.classpath.details.annotations.DoubleAttributeValue) StringLiteralExpr(com.github.antlrjavaparser.api.expr.StringLiteralExpr) NameExpr(com.github.antlrjavaparser.api.expr.NameExpr) ArrayList(java.util.ArrayList) CharAttributeValue(org.springframework.roo.classpath.details.annotations.CharAttributeValue) EnumDetails(org.springframework.roo.model.EnumDetails) EnumAttributeValue(org.springframework.roo.classpath.details.annotations.EnumAttributeValue) AnnotationMetadata(org.springframework.roo.classpath.details.annotations.AnnotationMetadata) JavaSymbolName(org.springframework.roo.model.JavaSymbolName) ArrayInitializerExpr(com.github.antlrjavaparser.api.expr.ArrayInitializerExpr) BooleanLiteralExpr(com.github.antlrjavaparser.api.expr.BooleanLiteralExpr) LongLiteralExpr(com.github.antlrjavaparser.api.expr.LongLiteralExpr) FieldAccessExpr(com.github.antlrjavaparser.api.expr.FieldAccessExpr) StringAttributeValue(org.springframework.roo.classpath.details.annotations.StringAttributeValue) NestedAnnotationAttributeValue(org.springframework.roo.classpath.details.annotations.NestedAnnotationAttributeValue) ArrayAttributeValue(org.springframework.roo.classpath.details.annotations.ArrayAttributeValue) AnnotationAttributeValue(org.springframework.roo.classpath.details.annotations.AnnotationAttributeValue) NestedAnnotationAttributeValue(org.springframework.roo.classpath.details.annotations.NestedAnnotationAttributeValue) BinaryExpr(com.github.antlrjavaparser.api.expr.BinaryExpr) IntegerAttributeValue(org.springframework.roo.classpath.details.annotations.IntegerAttributeValue) CharLiteralExpr(com.github.antlrjavaparser.api.expr.CharLiteralExpr) UnaryExpr(com.github.antlrjavaparser.api.expr.UnaryExpr) BooleanAttributeValue(org.springframework.roo.classpath.details.annotations.BooleanAttributeValue) JavaType(org.springframework.roo.model.JavaType) JavaType(org.springframework.roo.model.JavaType) Type(com.github.antlrjavaparser.api.type.Type) LongAttributeValue(org.springframework.roo.classpath.details.annotations.LongAttributeValue) DoubleLiteralExpr(com.github.antlrjavaparser.api.expr.DoubleLiteralExpr) Expression(com.github.antlrjavaparser.api.expr.Expression) ClassExpr(com.github.antlrjavaparser.api.expr.ClassExpr)

Example 2 with ClassExpr

use of com.github.antlrjavaparser.api.expr.ClassExpr in project spring-roo by spring-projects.

the class JavaParserAnnotationMetadataBuilder method convert.

@SuppressWarnings("unchecked")
private static MemberValuePair convert(final AnnotationAttributeValue<?> value, CompilationUnitServices compilationUnitServices) {
    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().getSimpleTypeName()));
        } else if (castValue.getValue().getAttributeNames().size() == 1 && (castValue.getValue().getAttributeNames().get(0) == null || "value".equals(castValue.getValue().getAttributeNames().get(0).getSymbolName()))) {
            annotationExpr = new SingleMemberAnnotationExpr(JavaParserUtils.getNameExpr(nestedAnnotation.getAnnotationType().getSimpleTypeName()), convert(nestedAnnotation.getAttribute(nestedAnnotation.getAttributeNames().get(0)), compilationUnitServices).getValue());
        } else {
            final List<MemberValuePair> memberValuePairs = new ArrayList<MemberValuePair>();
            for (final JavaSymbolName attributeName : nestedAnnotation.getAttributeNames()) {
                memberValuePairs.add(convert(nestedAnnotation.getAttribute(attributeName), compilationUnitServices));
            }
            annotationExpr = new NormalAnnotationExpr(JavaParserUtils.getNameExpr(nestedAnnotation.getAnnotationType().getSimpleTypeName()), memberValuePairs);
        }
        // Add imports for nested annotation types
        JavaParserUtils.importTypeIfRequired(compilationUnitServices.getEnclosingTypeName(), compilationUnitServices.getImports(), nestedAnnotation.getAnnotationType());
        // Rely on the nested instance to know its member value pairs
        return new MemberValuePair(value.getName().getSymbolName(), annotationExpr);
    }
    if (value instanceof BooleanAttributeValue) {
        final boolean castValue = ((BooleanAttributeValue) value).getValue();
        final BooleanLiteralExpr convertedValue = new BooleanLiteralExpr(castValue);
        return new MemberValuePair(value.getName().getSymbolName(), convertedValue);
    }
    if (value instanceof CharAttributeValue) {
        final char castValue = ((CharAttributeValue) value).getValue();
        final CharLiteralExpr convertedValue = new CharLiteralExpr(new String(new char[] { castValue }));
        return new MemberValuePair(value.getName().getSymbolName(), convertedValue);
    }
    if (value instanceof LongAttributeValue) {
        final Long castValue = ((LongAttributeValue) value).getValue();
        final LongLiteralExpr convertedValue = new LongLiteralExpr(castValue.toString() + "L");
        return new MemberValuePair(value.getName().getSymbolName(), convertedValue);
    }
    if (value instanceof IntegerAttributeValue) {
        final Integer castValue = ((IntegerAttributeValue) value).getValue();
        final IntegerLiteralExpr convertedValue = new IntegerLiteralExpr(castValue.toString());
        return new MemberValuePair(value.getName().getSymbolName(), convertedValue);
    }
    if (value instanceof DoubleAttributeValue) {
        final DoubleAttributeValue doubleAttributeValue = (DoubleAttributeValue) value;
        final Double castValue = doubleAttributeValue.getValue();
        DoubleLiteralExpr convertedValue;
        if (doubleAttributeValue.isFloatingPrecisionOnly()) {
            convertedValue = new DoubleLiteralExpr(castValue.toString() + "F");
        } else {
            convertedValue = new DoubleLiteralExpr(castValue.toString() + "D");
        }
        return new MemberValuePair(value.getName().getSymbolName(), convertedValue);
    }
    if (value instanceof StringAttributeValue) {
        final String castValue = ((StringAttributeValue) value).getValue();
        final StringLiteralExpr convertedValue = new StringLiteralExpr(castValue.toString());
        return new MemberValuePair(value.getName().getSymbolName(), convertedValue);
    }
    if (value instanceof EnumAttributeValue) {
        final EnumDetails castValue = ((EnumAttributeValue) value).getValue();
        // This isn't as elegant as it could be (ie loss of type
        // parameters), but it will do for now
        final FieldAccessExpr convertedValue = new FieldAccessExpr(JavaParserUtils.getNameExpr(castValue.getType().getFullyQualifiedTypeName()), castValue.getField().getSymbolName());
        return new MemberValuePair(value.getName().getSymbolName(), convertedValue);
    }
    if (value instanceof ClassAttributeValue) {
        final JavaType castValue = ((ClassAttributeValue) value).getValue();
        // This doesn't preserve type parameters
        final NameExpr nameExpr = JavaParserUtils.importTypeIfRequired(compilationUnitServices.getEnclosingTypeName(), compilationUnitServices.getImports(), castValue);
        final ClassExpr convertedValue = new ClassExpr(JavaParserUtils.getReferenceType(nameExpr));
        return new MemberValuePair(value.getName().getSymbolName(), convertedValue);
    }
    if (value instanceof ArrayAttributeValue) {
        final ArrayAttributeValue<AnnotationAttributeValue<?>> castValue = (ArrayAttributeValue<AnnotationAttributeValue<?>>) value;
        final List<Expression> arrayElements = new ArrayList<Expression>();
        for (final AnnotationAttributeValue<?> v : castValue.getValue()) {
            final MemberValuePair converted = convert(v, compilationUnitServices);
            if (converted != null) {
                arrayElements.add(converted.getValue());
            }
        }
        return new MemberValuePair(value.getName().getSymbolName(), new ArrayInitializerExpr(arrayElements));
    }
    throw new UnsupportedOperationException("Unsupported attribute value '" + value.getName() + "' of type '" + value.getClass().getName() + "'");
}
Also used : IntegerLiteralExpr(com.github.antlrjavaparser.api.expr.IntegerLiteralExpr) ClassAttributeValue(org.springframework.roo.classpath.details.annotations.ClassAttributeValue) AnnotationExpr(com.github.antlrjavaparser.api.expr.AnnotationExpr) MarkerAnnotationExpr(com.github.antlrjavaparser.api.expr.MarkerAnnotationExpr) SingleMemberAnnotationExpr(com.github.antlrjavaparser.api.expr.SingleMemberAnnotationExpr) NormalAnnotationExpr(com.github.antlrjavaparser.api.expr.NormalAnnotationExpr) DoubleAttributeValue(org.springframework.roo.classpath.details.annotations.DoubleAttributeValue) StringLiteralExpr(com.github.antlrjavaparser.api.expr.StringLiteralExpr) NameExpr(com.github.antlrjavaparser.api.expr.NameExpr) ArrayList(java.util.ArrayList) CharAttributeValue(org.springframework.roo.classpath.details.annotations.CharAttributeValue) EnumAttributeValue(org.springframework.roo.classpath.details.annotations.EnumAttributeValue) EnumDetails(org.springframework.roo.model.EnumDetails) AnnotationMetadata(org.springframework.roo.classpath.details.annotations.AnnotationMetadata) SingleMemberAnnotationExpr(com.github.antlrjavaparser.api.expr.SingleMemberAnnotationExpr) JavaSymbolName(org.springframework.roo.model.JavaSymbolName) MemberValuePair(com.github.antlrjavaparser.api.expr.MemberValuePair) ArrayInitializerExpr(com.github.antlrjavaparser.api.expr.ArrayInitializerExpr) BooleanLiteralExpr(com.github.antlrjavaparser.api.expr.BooleanLiteralExpr) LongLiteralExpr(com.github.antlrjavaparser.api.expr.LongLiteralExpr) ArrayList(java.util.ArrayList) List(java.util.List) FieldAccessExpr(com.github.antlrjavaparser.api.expr.FieldAccessExpr) NormalAnnotationExpr(com.github.antlrjavaparser.api.expr.NormalAnnotationExpr) StringAttributeValue(org.springframework.roo.classpath.details.annotations.StringAttributeValue) NestedAnnotationAttributeValue(org.springframework.roo.classpath.details.annotations.NestedAnnotationAttributeValue) ArrayAttributeValue(org.springframework.roo.classpath.details.annotations.ArrayAttributeValue) AnnotationAttributeValue(org.springframework.roo.classpath.details.annotations.AnnotationAttributeValue) NestedAnnotationAttributeValue(org.springframework.roo.classpath.details.annotations.NestedAnnotationAttributeValue) IntegerAttributeValue(org.springframework.roo.classpath.details.annotations.IntegerAttributeValue) CharLiteralExpr(com.github.antlrjavaparser.api.expr.CharLiteralExpr) MarkerAnnotationExpr(com.github.antlrjavaparser.api.expr.MarkerAnnotationExpr) BooleanAttributeValue(org.springframework.roo.classpath.details.annotations.BooleanAttributeValue) JavaType(org.springframework.roo.model.JavaType) LongAttributeValue(org.springframework.roo.classpath.details.annotations.LongAttributeValue) DoubleLiteralExpr(com.github.antlrjavaparser.api.expr.DoubleLiteralExpr) Expression(com.github.antlrjavaparser.api.expr.Expression) ClassExpr(com.github.antlrjavaparser.api.expr.ClassExpr)

Example 3 with ClassExpr

use of com.github.antlrjavaparser.api.expr.ClassExpr in project spring-roo by spring-projects.

the class JavaParserUtils method importExpressionIfRequired.

/**
 * Recognises {@link Expression}s of type {@link FieldAccessExpr} and
 * {@link ClassExpr} and automatically imports them if required, returning
 * the correct {@link Expression} that should subsequently be used.
 * <p>
 * Even if an {@link Expression} is not resolved by this method into a type
 * and/or imported, the method guarantees to always return an
 * {@link Expression} that the caller can subsequently use in place of the
 * passed {@link Expression}. In practical terms, the {@link Expression}
 * passed to this method will be returned unless the type was already
 * imported, just imported, or represented a java.lang type.
 *
 * @param targetType the compilation unit target type (required)
 * @param imports the existing imports (required)
 * @param value that expression, which need not necessarily be resolvable to
 *            a type (required)
 * @return the expression to now use, as appropriately resolved (never
 *         returns null)
 */
public static Expression importExpressionIfRequired(final JavaType targetType, final List<ImportDeclaration> imports, final Expression value) {
    Validate.notNull(targetType, "Target type required");
    Validate.notNull(imports, "Imports required");
    Validate.notNull(value, "Expression value required");
    if (value instanceof FieldAccessExpr) {
        final Expression scope = ((FieldAccessExpr) value).getScope();
        final String field = ((FieldAccessExpr) value).getField();
        if (scope instanceof QualifiedNameExpr) {
            final String packageName = ((QualifiedNameExpr) scope).getQualifier().getName();
            final String simpleName = ((QualifiedNameExpr) scope).getName();
            final String fullyQualifiedName = packageName + "." + simpleName;
            final JavaType javaType = new JavaType(fullyQualifiedName);
            final NameExpr nameToUse = importTypeIfRequired(targetType, imports, javaType);
            if (!(nameToUse instanceof QualifiedNameExpr)) {
                return new FieldAccessExpr(nameToUse, field);
            }
        }
    } else if (value instanceof ClassExpr) {
        final Type type = ((ClassExpr) value).getType();
        if (type instanceof ClassOrInterfaceType) {
            final JavaType javaType = new JavaType(((ClassOrInterfaceType) type).getName());
            final NameExpr nameToUse = importTypeIfRequired(targetType, imports, javaType);
            if (!(nameToUse instanceof QualifiedNameExpr)) {
                return new ClassExpr(new ClassOrInterfaceType(javaType.getSimpleTypeName()));
            }
        } else if (type instanceof ReferenceType && ((ReferenceType) type).getType() instanceof ClassOrInterfaceType) {
            final ClassOrInterfaceType cit = (ClassOrInterfaceType) ((ReferenceType) type).getType();
            final JavaType javaType = new JavaType(cit.getName());
            final NameExpr nameToUse = importTypeIfRequired(targetType, imports, javaType);
            if (!(nameToUse instanceof QualifiedNameExpr)) {
                return new ClassExpr(new ClassOrInterfaceType(javaType.getSimpleTypeName()));
            }
        }
    } else if (value instanceof ArrayInitializerExpr) {
        List<Expression> values = ((ArrayInitializerExpr) value).getValues();
        for (Expression expressionValue : values) {
            // Check annotation expression
            if (expressionValue instanceof NormalAnnotationExpr) {
                Validate.isInstanceOf(NormalAnnotationExpr.class, expressionValue, "Attempting to add >1 annotation member-value pair requires an existing normal annotation expression");
                final List<MemberValuePair> annotationPairs = ((NormalAnnotationExpr) expressionValue).getPairs();
                for (final MemberValuePair pair : annotationPairs) {
                    final Expression toUse = JavaParserUtils.importExpressionIfRequired(targetType, imports, pair.getValue());
                    pair.setValue(toUse);
                }
            }
        }
    }
    // Make no changes
    return value;
}
Also used : NameExpr(com.github.antlrjavaparser.api.expr.NameExpr) QualifiedNameExpr(com.github.antlrjavaparser.api.expr.QualifiedNameExpr) ClassOrInterfaceType(com.github.antlrjavaparser.api.type.ClassOrInterfaceType) ReferenceType(com.github.antlrjavaparser.api.type.ReferenceType) QualifiedNameExpr(com.github.antlrjavaparser.api.expr.QualifiedNameExpr) JdkJavaType(org.springframework.roo.model.JdkJavaType) JavaType(org.springframework.roo.model.JavaType) WildcardType(com.github.antlrjavaparser.api.type.WildcardType) ClassOrInterfaceType(com.github.antlrjavaparser.api.type.ClassOrInterfaceType) DataType(org.springframework.roo.model.DataType) JdkJavaType(org.springframework.roo.model.JdkJavaType) VoidType(com.github.antlrjavaparser.api.type.VoidType) JavaType(org.springframework.roo.model.JavaType) PrimitiveType(com.github.antlrjavaparser.api.type.PrimitiveType) ReferenceType(com.github.antlrjavaparser.api.type.ReferenceType) Type(com.github.antlrjavaparser.api.type.Type) MemberValuePair(com.github.antlrjavaparser.api.expr.MemberValuePair) Expression(com.github.antlrjavaparser.api.expr.Expression) ArrayInitializerExpr(com.github.antlrjavaparser.api.expr.ArrayInitializerExpr) FieldAccessExpr(com.github.antlrjavaparser.api.expr.FieldAccessExpr) ClassExpr(com.github.antlrjavaparser.api.expr.ClassExpr) NormalAnnotationExpr(com.github.antlrjavaparser.api.expr.NormalAnnotationExpr)

Aggregations

ArrayInitializerExpr (com.github.antlrjavaparser.api.expr.ArrayInitializerExpr)3 ClassExpr (com.github.antlrjavaparser.api.expr.ClassExpr)3 Expression (com.github.antlrjavaparser.api.expr.Expression)3 FieldAccessExpr (com.github.antlrjavaparser.api.expr.FieldAccessExpr)3 NameExpr (com.github.antlrjavaparser.api.expr.NameExpr)3 NormalAnnotationExpr (com.github.antlrjavaparser.api.expr.NormalAnnotationExpr)3 JavaType (org.springframework.roo.model.JavaType)3 AnnotationExpr (com.github.antlrjavaparser.api.expr.AnnotationExpr)2 BooleanLiteralExpr (com.github.antlrjavaparser.api.expr.BooleanLiteralExpr)2 CharLiteralExpr (com.github.antlrjavaparser.api.expr.CharLiteralExpr)2 DoubleLiteralExpr (com.github.antlrjavaparser.api.expr.DoubleLiteralExpr)2 IntegerLiteralExpr (com.github.antlrjavaparser.api.expr.IntegerLiteralExpr)2 LongLiteralExpr (com.github.antlrjavaparser.api.expr.LongLiteralExpr)2 MarkerAnnotationExpr (com.github.antlrjavaparser.api.expr.MarkerAnnotationExpr)2 MemberValuePair (com.github.antlrjavaparser.api.expr.MemberValuePair)2 SingleMemberAnnotationExpr (com.github.antlrjavaparser.api.expr.SingleMemberAnnotationExpr)2 StringLiteralExpr (com.github.antlrjavaparser.api.expr.StringLiteralExpr)2 Type (com.github.antlrjavaparser.api.type.Type)2 ArrayList (java.util.ArrayList)2 AnnotationAttributeValue (org.springframework.roo.classpath.details.annotations.AnnotationAttributeValue)2