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

Examples of org.springframework.roo.classpath.details.annotations.AnnotationMetadata.substring()


            String value = ((LongLiteralExpr) expression).getValue();
            Validate.isTrue(
                    value.toUpperCase().endsWith("L"),
                    "Expected long literal expression '%s' to end in 'l' or 'L'",
                    value);
            value = value.substring(0, value.length() - 1);
            final long l = new Long(value);
            return new LongAttributeValue(annotationName, l);
        }

        if (expression instanceof IntegerLiteralExpr) {
View Full Code Here


        if (expression instanceof DoubleLiteralExpr) {
            String value = ((DoubleLiteralExpr) expression).getValue();
            boolean floatingPrecisionOnly = false;
            if (value.toUpperCase().endsWith("F")) {
                value = value.substring(0, value.length() - 1);
                floatingPrecisionOnly = true;
            }
            if (value.toUpperCase().endsWith("D")) {
                value = value.substring(0, value.length() - 1);
            }
View Full Code Here

            if (value.toUpperCase().endsWith("F")) {
                value = value.substring(0, value.length() - 1);
                floatingPrecisionOnly = true;
            }
            if (value.toUpperCase().endsWith("D")) {
                value = value.substring(0, value.length() - 1);
            }
            final double d = new Double(value);
            return new DoubleAttributeValue(annotationName, d,
                    floatingPrecisionOnly);
        }
View Full Code Here

        if (expression instanceof UnaryExpr) {
            final UnaryExpr castExp = (UnaryExpr) expression;
            if (castExp.getOperator() == Operator.negative) {
                String value = castExp.toString();
                value = value.toUpperCase().endsWith("L") ? value.substring(0,
                        value.length() - 1) : value;
                final long l = new Long(value);
                return new LongAttributeValue(annotationName, l);
            }
            else {
View Full Code Here

        if (expression instanceof LongLiteralExpr) {
            String value = ((LongLiteralExpr) expression).getValue();
            Validate.isTrue(value.toUpperCase().endsWith("L"),
                    "Expected long literal expression '" + value
                            + "' to end in 'l' or 'L'");
            value = value.substring(0, value.length() - 1);
            final long l = new Long(value);
            return new LongAttributeValue(annotationName, l);
        }

        if (expression instanceof IntegerLiteralExpr) {
View Full Code Here

        if (expression instanceof DoubleLiteralExpr) {
            String value = ((DoubleLiteralExpr) expression).getValue();
            boolean floatingPrecisionOnly = false;
            if (value.toUpperCase().endsWith("F")) {
                value = value.substring(0, value.length() - 1);
                floatingPrecisionOnly = true;
            }
            if (value.toUpperCase().endsWith("D")) {
                value = value.substring(0, value.length() - 1);
            }
View Full Code Here

            if (value.toUpperCase().endsWith("F")) {
                value = value.substring(0, value.length() - 1);
                floatingPrecisionOnly = true;
            }
            if (value.toUpperCase().endsWith("D")) {
                value = value.substring(0, value.length() - 1);
            }
            final double d = new Double(value);
            return new DoubleAttributeValue(annotationName, d,
                    floatingPrecisionOnly);
        }
View Full Code Here

        if (expression instanceof UnaryExpr) {
            final UnaryExpr castExp = (UnaryExpr) expression;
            if (castExp.getOperator() == Operator.negative) {
                String value = castExp.toString();
                value = value.toUpperCase().endsWith("L") ? value.substring(0,
                        value.length() - 1) : value;
                final long l = new Long(value);
                return new LongAttributeValue(annotationName, l);
            }
            else {
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.