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

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


                ROO_PERMISSION_EVALUATOR);
        final String classMid = PhysicalTypeIdentifier.createIdentifier(
                permissionEvaluatorClass, pathResolver.getPath(identifier));
        final ClassOrInterfaceTypeDetailsBuilder classBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                classMid, PUBLIC, permissionEvaluatorClass, CLASS);
        classBuilder.addAnnotation(classAnnotationMetadata.build());
        classBuilder.addImplementsType(PERMISSION_EVALUATOR);
        typeManagementService.createOrUpdateTypeOnDisk(classBuilder.build());

        metadataService.get(PermissionEvaluatorMetadata.createIdentifier(
                permissionEvaluatorClass, focusedSrcMainJava));
View Full Code Here


        if (StringUtils.isNotBlank(annotationValues.getEntityName())) {
            final AnnotationMetadataBuilder entityBuilder = new AnnotationMetadataBuilder(
                    entityAnnotation);
            entityBuilder.addStringAttribute("name",
                    annotationValues.getEntityName());
            entityAnnotation = entityBuilder.build();
        }

        return entityAnnotation;
    }
View Full Code Here

            final AnnotationMetadataBuilder inheritanceBuilder = new AnnotationMetadataBuilder(
                    INHERITANCE);
            inheritanceBuilder.addEnumAttribute("strategy",
                    new EnumDetails(INHERITANCE_TYPE, new JavaSymbolName(
                            annotationValues.getInheritanceType())));
            return inheritanceBuilder.build();
        }
        return null;
    }

    /**
 
View Full Code Here

                tableBuilder.addStringAttribute("schema", schema);
            }
            if (StringUtils.isNotBlank(table)) {
                tableBuilder.addStringAttribute("name", table);
            }
            return tableBuilder.build();
        }
        return null;
    }

    /**
 
View Full Code Here

                annotation);
        // annotationBuulder.addClassAttribute("forClass", entity); // TODO The
        // forClass attribute causes issues
        annotationBuulder.addStringAttribute("value",
                destination.getFullyQualifiedTypeName());
        return annotationBuulder.build();
    }

    private MethodMetadataBuilder getGetAsObjectMethod(
            final MemberTypeAdditions findMethod,
            final MethodMetadata identifierAccessor) {
View Full Code Here

    @Override
    public AnnotationMetadata build() {
        final AnnotationMetadataBuilder annotationMetadataBuilder = new AnnotationMetadataBuilder(
                annotationType, attributeValues);

        final AnnotationMetadata md = annotationMetadataBuilder.build();
        md.setCommentStructure(commentStructure);

        return md;
    }
View Full Code Here

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

    /**
     * Locates declared fields.
     * <p>
 
View Full Code Here

        final String interfaceMdId = PhysicalTypeIdentifier.createIdentifier(
                interfaceType, pathResolver.getPath(interfaceIdentifier));
        final ClassOrInterfaceTypeDetailsBuilder cidBuilder = new ClassOrInterfaceTypeDetailsBuilder(
                interfaceMdId, Modifier.PUBLIC, interfaceType,
                PhysicalTypeCategory.INTERFACE);
        cidBuilder.addAnnotation(interfaceAnnotationMetadata.build());
        final JavaType listType = new JavaType(List.class.getName(), 0,
                DataType.TYPE, null, Arrays.asList(domainType));
        cidBuilder.addMethod(new MethodMetadataBuilder(interfaceMdId, 0,
                new JavaSymbolName("findAll"), listType,
                new InvocableMemberBodyBuilder()));
View Full Code Here

                    if (!authorizeValue.equals("")) {
                        final AnnotationMetadataBuilder annotationMetadataBuilder = new AnnotationMetadataBuilder(method.usesPostAuthorize() ? SpringJavaType.POST_AUTHORIZE : PRE_AUTHORIZE);
                        annotationMetadataBuilder.addStringAttribute("value",
                            authorizeValue.toString());
                        methodMetadataBuilder
                                .addAnnotation(annotationMetadataBuilder
                                        .build());
                    }

                    builder.addMethod(methodMetadataBuilder);
                }
View Full Code Here

        final AnnotationMetadataBuilder annotationBuilder = new AnnotationMetadataBuilder(
                new JavaType(
                        "org.springframework.roo.addon.tostring.RooToString"));
        final ClassOrInterfaceTypeDetails newSimpleInterfaceDetails = addAnnotation(
                simpleInterfaceDetails, annotationBuilder.build());

        // Invoke
        final String result = typeParsingService
                .updateAndGetCompilationUnitContents(file.getCanonicalPath(),
                        newSimpleInterfaceDetails);
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.