Package org.springframework.roo.classpath.details

Examples of org.springframework.roo.classpath.details.ClassOrInterfaceTypeDetailsBuilder.addMethod()


                    final CommentStructure commentStructure = new CommentStructure();
                    JavaParserCommentMetadataBuilder.updateCommentsToRoo(
                            commentStructure, member);
                    method.setCommentStructure(commentStructure);

                    cidBuilder.addMethod(method);
                }
                if (member instanceof ConstructorDeclaration) {
                    final ConstructorDeclaration castMember = (ConstructorDeclaration) member;
                    final ConstructorMetadata constructor = JavaParserConstructorMetadataBuilder
                            .getInstance(declaredByMetadataId, castMember,
View Full Code Here


                    final MethodDeclaration castMember = (MethodDeclaration) member;
                    final MethodMetadata method = JavaParserMethodMetadataBuilder
                            .getInstance(declaredByMetadataId, castMember,
                                    compilationUnitServices, typeParameterNames)
                            .build();
                    cidBuilder.addMethod(method);
                }
                if (member instanceof ConstructorDeclaration) {
                    final ConstructorDeclaration castMember = (ConstructorDeclaration) member;
                    final ConstructorMetadata constructor = JavaParserConstructorMetadataBuilder
                            .getInstance(declaredByMetadataId, castMember,
View Full Code Here

                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()));
        typeManagementService.createOrUpdateTypeOnDisk(cidBuilder.build());
    }
View Full Code Here

            MethodMetadataBuilder setSeviceMethod = new MethodMetadataBuilder(
                    callerMID, PUBLIC, setMethodName, JavaType.VOID_PRIMITIVE,
                    AnnotatedJavaType.convertFromJavaTypes(parameterTypes),
                    parameterNames, bodyBuilder);

            cidBuilder.addMethod(setSeviceMethod);
        }

        // Generate an additions object that includes a call to the method
        return MemberTypeAdditions.getInstance(cidBuilder, fieldName,
                methodName, false, parameters);
View Full Code Here

                PRIVATE | TRANSIENT, Arrays
                        .asList(new AnnotationMetadataBuilder(AUTOWIRED)),
                fieldName, JMS_OPERATIONS));

        // Create the method
        cidBuilder.addMethod(createSendMessageMethod(fieldName,
                declaredByMetadataId, asynchronous));

        if (asynchronous) {
            ensureSpringAsynchronousSupportEnabled();
        }
View Full Code Here

                declaredByMetadataId, PRIVATE_TRANSIENT, annotations,
                fieldName, MAIL_SENDER);
        cidBuilder.addField(mailSenderFieldBuilder);

        // Add the "sendMessage" method
        cidBuilder.addMethod(getSendMethod(fieldName, async,
                declaredByMetadataId, cidBuilder));
        typeManagementService.createOrUpdateTypeOnDisk(cidBuilder.build());
    }

    public void installEmail(final String hostServer,
View Full Code Here

                                    .containsAll(params)) {
                                final MethodMetadataBuilder abstractMethodBuilder = new MethodMetadataBuilder(
                                        abstractClassBuilder
                                                .getDeclaredByMetadataId(),
                                        methodBuilder.build());
                                abstractClassBuilder
                                        .addMethod(convertModifier(abstractMethodBuilder));
                                methodsToRemove.add(methodBuilder);
                                break;
                            }
                        }
View Full Code Here

        cidBuilder.setModifier(Modifier.PUBLIC);
        cidBuilder.setPhysicalTypeCategory(PhysicalTypeCategory.CLASS);
        cidBuilder.addExtendsTypes(new JavaType(LOCATOR
                .getFullyQualifiedTypeName(), 0, DataType.TYPE, null, Arrays
                .asList(entity, identifierType)));
        cidBuilder.addMethod(getCreateMethod(locatorPhysicalTypeId, entity));

        final MemberTypeAdditions findMethodAdditions = layerService
                .getMemberTypeAdditions(locatorPhysicalTypeId,
                        CustomDataKeys.FIND_METHOD.name(), entity,
                        identifierType, LAYER_POSITION, !useXmlConfiguration,
View Full Code Here

        }

        Validate.notNull(findMethodAdditions,
                "Find method not available for entity '%s'",
                entity.getFullyQualifiedTypeName());
        cidBuilder.addMethod(getFindMethod(findMethodAdditions, cidBuilder,
                locatorPhysicalTypeId, entity, identifierType));

        cidBuilder
                .addMethod(getDomainTypeMethod(locatorPhysicalTypeId, entity));
        cidBuilder.addMethod(getIdMethod(locatorPhysicalTypeId, entity,
View Full Code Here

                "Find method not available for entity '%s'",
                entity.getFullyQualifiedTypeName());
        cidBuilder.addMethod(getFindMethod(findMethodAdditions, cidBuilder,
                locatorPhysicalTypeId, entity, identifierType));

        cidBuilder
                .addMethod(getDomainTypeMethod(locatorPhysicalTypeId, entity));
        cidBuilder.addMethod(getIdMethod(locatorPhysicalTypeId, entity,
                identifierAccessor));
        cidBuilder.addMethod(getIdTypeMethod(locatorPhysicalTypeId, entity,
                identifierType));
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.