Package org.springframework.roo.classpath.details.annotations

Examples of org.springframework.roo.classpath.details.annotations.ClassAttributeValue


        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<?>>();
View Full Code Here


        cidBuilder.addAnnotation(new AnnotationMetadataBuilder(
                RooJavaType.ROO_TO_STRING));

        final List<AnnotationAttributeValue<?>> attributes = new ArrayList<AnnotationAttributeValue<?>>();
        if (!idType.equals(JdkJavaType.BIG_INTEGER)) {
            attributes.add(new ClassAttributeValue(new JavaSymbolName(
                    "identifierType"), idType));
        }
        cidBuilder.addAnnotation(new AnnotationMetadataBuilder(
                RooJavaType.ROO_MONGO_ENTITY, attributes));
        typeManagementService.createOrUpdateTypeOnDisk(cidBuilder.build());
View Full Code Here

        }

        // Build interface type
        final AnnotationMetadataBuilder interfaceAnnotationMetadata = new AnnotationMetadataBuilder(
                ROO_REPOSITORY_MONGO);
        interfaceAnnotationMetadata.addAttribute(new ClassAttributeValue(
                new JavaSymbolName("domainType"), domainType));
        final String interfaceMdId = PhysicalTypeIdentifier.createIdentifier(
                interfaceType, pathResolver.getPath(interfaceIdentifier));
        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                interfaceMdId, Modifier.PUBLIC, interfaceType,
View Full Code Here

                                result.add(stringValue.getValue());
                            }
                            else if (fieldType.getComponentType().equals(
                                    JavaType.class)
                                    && val instanceof ClassAttributeValue) {
                                final ClassAttributeValue classValue = (ClassAttributeValue) val;
                                result1.add(classValue.getValue());
                            }
                        }
                        if (result.size() > 0) {
                            // We had at least one string array, so we change
                            // the field
View Full Code Here

            return;
        }

        final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
        final List<AnnotationAttributeValue<?>> config = new ArrayList<AnnotationAttributeValue<?>>();
        config.add(new ClassAttributeValue(new JavaSymbolName("entity"), entity));
        if (!transactional) {
            config.add(new BooleanAttributeValue(new JavaSymbolName(
                    "transactional"), false));
        }
        annotations.add(new AnnotationMetadataBuilder(ROO_INTEGRATION_TEST,
View Full Code Here

        }

        // Determine if the mocking infrastructure needs installing
        final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
        final List<AnnotationAttributeValue<?>> config = new ArrayList<AnnotationAttributeValue<?>>();
        config.add(new ClassAttributeValue(new JavaSymbolName("value"), JUNIT_4));
        annotations.add(new AnnotationMetadataBuilder(RUN_WITH, config));
        annotations.add(new AnnotationMetadataBuilder(
                MOCK_STATIC_ENTITY_METHODS));

        final List<MethodMetadataBuilder> methods = new ArrayList<MethodMetadataBuilder>();
View Full Code Here

        }

        // Determine if the test infrastructure needs installing
        final List<AnnotationMetadataBuilder> annotations = new ArrayList<AnnotationMetadataBuilder>();
        final List<AnnotationAttributeValue<?>> config = new ArrayList<AnnotationAttributeValue<?>>();
        config.add(new ClassAttributeValue(new JavaSymbolName("value"), JUNIT_4));
        annotations.add(new AnnotationMetadataBuilder(RUN_WITH, config));

        final List<MethodMetadataBuilder> methods = new ArrayList<MethodMetadataBuilder>();
        final List<AnnotationMetadataBuilder> methodAnnotations = new ArrayList<AnnotationMetadataBuilder>();
        methodAnnotations.add(new AnnotationMetadataBuilder(TEST));
View Full Code Here

        final AnnotationMetadataBuilder interfaceAnnotationMetadata = new AnnotationMetadataBuilder(
                ROO_SERVICE);
        interfaceAnnotationMetadata
                .addAttribute(new ArrayAttributeValue<ClassAttributeValue>(
                        new JavaSymbolName("domainTypes"), Arrays
                                .asList(new ClassAttributeValue(
                                        new JavaSymbolName("foo"), domainType))));
        if (role == null) {
            role = "";
        }
        if (requireAuthentication || usePermissionEvaluator || !role.equals("")) {
View Full Code Here

        }

        // Build interface type
        final AnnotationMetadataBuilder interfaceAnnotationMetadata = new AnnotationMetadataBuilder(
                ROO_REPOSITORY_JPA);
        interfaceAnnotationMetadata.addAttribute(new ClassAttributeValue(
                new JavaSymbolName("domainType"), domainType));
        final String interfaceMdId = PhysicalTypeIdentifier.createIdentifier(
                interfaceType, pathResolver.getPath(interfaceIdentifier));
        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                interfaceMdId, Modifier.PUBLIC, interfaceType,
View Full Code Here

        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<?>>();
View Full Code Here

TOP

Related Classes of org.springframework.roo.classpath.details.annotations.ClassAttributeValue

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.