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

Examples of org.springframework.roo.classpath.details.annotations.AnnotationMetadataBuilder.build()


        if (governorTypeDetails.getAnnotation(COMPONENT) != null) {
            return null;
        }
        final AnnotationMetadataBuilder annotationBuilder = new AnnotationMetadataBuilder(
                COMPONENT);
        return annotationBuilder.build();
    }

    /**
     * @return the "data" field to use, which is either provided by the user or
     *         produced on demand (never returns null)
View Full Code Here


        }

        // Update the annotation on disk
        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                managedEntity);
        cidBuilder.updateTypeAnnotation(jpaAnnotationBuilder.build(),
                attributesToDeleteIfPresent);
        typeManagementService.createOrUpdateTypeOnDisk(cidBuilder.build());
        return table;
    }
}
View Full Code Here

                new JavaSymbolName("excludeFields"), ignoreFields));
        final AnnotationMetadataBuilder toStringAnnotationBuilder = new AnnotationMetadataBuilder(
                ROO_TO_STRING, attributes);
        updatedGovernorBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                governorTypeDetails);
        toStringAnnotation = toStringAnnotationBuilder.build();
        updatedGovernorBuilder.updateTypeAnnotation(toStringAnnotation,
                new HashSet<JavaSymbolName>());
    }

    private String getErrorMsg(final String tableName) {
View Full Code Here

        for (final Reference reference : references) {
            final AnnotationMetadataBuilder joinColumnAnnotation = getJoinColumnAnnotation(
                    reference, true, fieldType, nullable);
            arrayValues.add(new NestedAnnotationAttributeValue(
                    new JavaSymbolName(VALUE), joinColumnAnnotation.build()));
        }
        final List<AnnotationAttributeValue<?>> attributes = new ArrayList<AnnotationAttributeValue<?>>();
        attributes.add(new ArrayAttributeValue<NestedAnnotationAttributeValue>(
                new JavaSymbolName(VALUE), arrayValues));
        return new AnnotationMetadataBuilder(JOIN_COLUMNS, attributes);
View Full Code Here

        final Set<Reference> firstKeyReferences = iter.next().getReferences();
        for (final Reference reference : firstKeyReferences) {
            final AnnotationMetadataBuilder joinColumnBuilder = getJoinColumnAnnotation(
                    reference, firstKeyReferences.size() > 1);
            joinColumnArrayValues.add(new NestedAnnotationAttributeValue(
                    new JavaSymbolName(VALUE), joinColumnBuilder.build()));
        }
        joinTableAnnotationAttributes
                .add(new ArrayAttributeValue<NestedAnnotationAttributeValue>(
                        new JavaSymbolName("joinColumns"),
                        joinColumnArrayValues));
View Full Code Here

        for (final Reference reference : lastKeyReferences) {
            final AnnotationMetadataBuilder joinColumnBuilder = getJoinColumnAnnotation(
                    reference, lastKeyReferences.size() > 1);
            inverseJoinColumnArrayValues
                    .add(new NestedAnnotationAttributeValue(new JavaSymbolName(
                            VALUE), joinColumnBuilder.build()));
        }
        joinTableAnnotationAttributes
                .add(new ArrayAttributeValue<NestedAnnotationAttributeValue>(
                        new JavaSymbolName("inverseJoinColumns"),
                        inverseJoinColumnArrayValues));
View Full Code Here

    final AnnotationMetadataBuilder validAnnotation = new AnnotationMetadataBuilder(
        VALID);

    final List<AnnotatedJavaType> parameterTypes = Arrays
        .asList(new AnnotatedJavaType(formBackingType, validAnnotation
            .build()), new AnnotatedJavaType(BINDING_RESULT),
            new AnnotatedJavaType(MODEL), new AnnotatedJavaType(
                HTTP_SERVLET_REQUEST));
    final List<JavaSymbolName> parameterNames = Arrays.asList(
        new JavaSymbolName(entityName), new JavaSymbolName(
View Full Code Here

        new AnnotatedJavaType(javaTypePersistenceMetadataHolder
            .getIdentifierType(), pathVariableAnnotation.build()),
        new AnnotatedJavaType(new JavaType(Integer.class.getName()),
            firstResultAnnotation.build()), new AnnotatedJavaType(
            new JavaType(Integer.class.getName()),
            maxResultAnnotation.build()), new AnnotatedJavaType(
            MODEL));
    final List<JavaSymbolName> parameterNames = Arrays.asList(idFieldName,
        new JavaSymbolName("page"), new JavaSymbolName("size"),
        new JavaSymbolName("uiModel"));
View Full Code Here

            .build()),
            new AnnotatedJavaType(INT_OBJECT, maxResultAnnotation
                .build()),
            new AnnotatedJavaType(STRING, sortFieldNameAnnotation
                .build()),
            new AnnotatedJavaType(STRING, sortOrderAnnotation
                .build()), new AnnotatedJavaType(MODEL));
    final List<JavaSymbolName> parameterNames = Arrays.asList(
        new JavaSymbolName("page"), new JavaSymbolName("size"),
        new JavaSymbolName("sortFieldName"), new JavaSymbolName(
            "sortOrder"), new JavaSymbolName("uiModel"));
View Full Code Here

    final AnnotationMetadataBuilder pathVariableAnnotation = new AnnotationMetadataBuilder(
        PATH_VARIABLE, attributes);

    final List<AnnotatedJavaType> parameterTypes = Arrays.asList(
        new AnnotatedJavaType(javaTypePersistenceMetadataHolder
            .getIdentifierType(), pathVariableAnnotation.build()),
        new AnnotatedJavaType(MODEL));
    final List<JavaSymbolName> parameterNames = Arrays.asList(
        new JavaSymbolName(idFieldName), new JavaSymbolName("uiModel"));

    final List<AnnotationAttributeValue<?>> requestMappingAttributes = new ArrayList<AnnotationAttributeValue<?>>();
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.