Package org.springframework.roo.model

Examples of org.springframework.roo.model.JavaType


     * @param annotationType the annotation class (required)
     */
    protected AbstractAnnotationValues(
            final MemberHoldingTypeDetailsMetadataItem<?> governorMetadata,
            final Class<?> annotationType) {
        this(governorMetadata, new JavaType(annotationType));
    }
View Full Code Here


     *
     * @param annotationType the annotation class (required)
     * @since 1.2.0
     */
    public AnnotationMetadataBuilder(final Class<?> annotationType) {
        this(new JavaType(annotationType));
    }
View Full Code Here

     *
     * @param annotationType the fully-qualified name of the annotation type
     *            (required)
     */
    public AnnotationMetadataBuilder(final String annotationType) {
        this(new JavaType(annotationType));
    }
View Full Code Here

    }

    public void addClassAttribute(final String key,
            final String fullyQualifiedTypeName) {
        addAttribute(new ClassAttributeValue(new JavaSymbolName(key),
                new JavaType(fullyQualifiedTypeName)));
    }
View Full Code Here

        addAttribute(new EnumAttributeValue(new JavaSymbolName(key), details));
    }

    public void addEnumAttribute(final String key,
            final String fullyQualifiedTypeName, final String enumConstant) {
        final EnumDetails details = new EnumDetails(new JavaType(
                fullyQualifiedTypeName), new JavaSymbolName(enumConstant));
        addAttribute(new EnumAttributeValue(new JavaSymbolName(key), details));
    }
View Full Code Here

    @Override
    protected String getLocalMidToRequest(final ItdTypeDetails itdTypeDetails) {
        // Determine the governor for this ITD, and whether any metadata is even
        // hoping to hear about changes to that JavaType and its ITDs
        final JavaType governor = itdTypeDetails.getName();
        final String localMid = managedEntityTypes.get(governor);
        if (localMid != null) {
            return localMid;
        }
View Full Code Here

        final Map<JavaType, JavaType> domainTypeToIdTypeMap = new HashMap<JavaType, JavaType>();
        // Collect the additions for each method for each supported domain type
        final Map<JavaType, Map<ServiceLayerMethod, MemberTypeAdditions>> allCrudAdditions = new LinkedHashMap<JavaType, Map<ServiceLayerMethod, MemberTypeAdditions>>();
        for (final JavaType domainType : domainTypes) {

            final JavaType idType = persistenceMemberLocator
                    .getIdentifierType(domainType);
            if (idType == null) {
                return null;
            }
            domainTypeToIdTypeMap.put(domainType, idType);
View Full Code Here

                    || field.getCustomData().keySet()
                            .contains(CustomDataKeys.TRANSIENT_FIELD)
                    || !BeanInfoUtils.hasAccessorAndMutator(field, this)) {
                continue;
            }
            final JavaType returnType = method.getReturnType();
            if (returnType.isCommonCollectionType()) {
                for (final JavaType genericType : returnType.getParameters()) {
                    fieldTypes.add(genericType);
                }
            }
            else {
                if (!field.getCustomData().keySet().contains(EMBEDDED_FIELD)) {
View Full Code Here

        final ClassOrInterfaceTypeDetails simpleInterfaceDetails = typeParsingService
                .getTypeFromString(fileContents, SIMPLE_CLASS3_DECLARED_BY_MID,
                        SIMPLE_CLASS3_TYPE);

        final SetField fieldDetails = new SetField(
                SIMPLE_CLASS3_DECLARED_BY_MID, new JavaType(
                        SET.getFullyQualifiedTypeName(), 0, DataType.TYPE,
                        null, Arrays.asList(SIMPLE_CLASS3_TYPE)),
                new JavaSymbolName("children"), SIMPLE_CLASS3_TYPE,
                Cardinality.ONE_TO_MANY);
View Full Code Here

                .getTypeFromString(fileContents, SIMPLE_CLASS_DECLARED_BY_MID,
                        SIMPLE_CLASS_TYPE);

        final FieldMetadataBuilder fieldBuilder = new FieldMetadataBuilder(
                SIMPLE_CLASS_DECLARED_BY_MID, Modifier.PRIVATE,
                new JavaSymbolName("newFieldAddedByCode"), new JavaType(
                        String.class), "\"Create by code\"");
        final ClassOrInterfaceTypeDetails newSimpleInterfaceDetails = addField(
                simpleInterfaceDetails, fieldBuilder.build());

        // Invoke
View Full Code Here

TOP

Related Classes of org.springframework.roo.model.JavaType

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.