Package org.springframework.roo.model

Examples of org.springframework.roo.model.JavaSymbolName


            final List<AnnotationMetadataBuilder> annotations) {
        super.decorateAnnotationsList(annotations);
        final List<AnnotationAttributeValue<?>> attributes = new ArrayList<AnnotationAttributeValue<?>>();

        if (enumType != null) {
            JavaSymbolName value = new JavaSymbolName("ORDINAL");
            if (enumType == EnumType.STRING) {
                value = new JavaSymbolName("STRING");
            }
            attributes.add(new EnumAttributeValue(new JavaSymbolName("value"),
                    new EnumDetails(ENUM_TYPE, value)));
        }

        annotations.add(new AnnotationMetadataBuilder(ENUMERATED, attributes));
    }
View Full Code Here


                // Ensure field is accessible
                if (!field.isAccessible()) {
                    field.setAccessible(true);
                }

                final JavaSymbolName attributeName = new JavaSymbolName(
                        attribute);

                // Store the info
                fields.add(field);
                attributeNameForEachField.put(field, attributeName);

            }

            cachedIntrospections.put(target.getClass(), fields);
        }

        for (final Field field : fields) {
            // Lookup whether this attribute name was provided
            final JavaSymbolName attributeName = attributeNameForEachField
                    .get(field);
            if (attributeName == null) {
                throw new IllegalStateException(
                        "Expected cached attribute name lookup");
            }
View Full Code Here

            final List<AnnotationMetadataBuilder> annotations) {
        super.decorateAnnotationsList(annotations);
        if (sizeMin != null || sizeMax != null) {
            final List<AnnotationAttributeValue<?>> attrs = new ArrayList<AnnotationAttributeValue<?>>();
            if (sizeMin != null) {
                attrs.add(new IntegerAttributeValue(new JavaSymbolName("min"),
                        sizeMin));
            }
            if (sizeMax != null) {
                attrs.add(new IntegerAttributeValue(new JavaSymbolName("max"),
                        sizeMax));
            }
            annotations.add(new AnnotationMetadataBuilder(SIZE, attrs));
        }
    }
View Full Code Here

        // Locate existing attribute with this key and replace it
        attributeValues.put(value.getName().getSymbolName(), value);
    }

    public void addBooleanAttribute(final String key, final boolean value) {
        addAttribute(new BooleanAttributeValue(new JavaSymbolName(key), value));
    }
View Full Code Here

    public void addBooleanAttribute(final String key, final boolean value) {
        addAttribute(new BooleanAttributeValue(new JavaSymbolName(key), value));
    }

    public void addCharAttribute(final String key, final char value) {
        addAttribute(new CharAttributeValue(new JavaSymbolName(key), value));
    }
View Full Code Here

     *
     * @param key the attribute name (required)
     * @param javaType the value (required)
     */
    public void addClassAttribute(final String key, final JavaType javaType) {
        addAttribute(new ClassAttributeValue(new JavaSymbolName(key), javaType));
    }
View Full Code Here

        addAttribute(new ClassAttributeValue(new JavaSymbolName(key), javaType));
    }

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

                new JavaType(fullyQualifiedTypeName)));
    }

    public void addDoubleAttribute(final String key, final double value,
            final boolean floatingPrecisionOnly) {
        addAttribute(new DoubleAttributeValue(new JavaSymbolName(key), value,
                floatingPrecisionOnly));
    }
View Full Code Here

        addAttribute(new DoubleAttributeValue(new JavaSymbolName(key), value,
                floatingPrecisionOnly));
    }

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

    }

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

TOP

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

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.