Package com.asakusafw.dmdl.model

Examples of com.asakusafw.dmdl.model.AstLiteral.toStringValue()


    private <T extends Enum<?>> T consumeOption(
            DmdlSemantics environment, AstAttribute attribute, Map<String, AstAttributeElement> elements,
            String key, String description, T[] options) {
        AstLiteral literal = take(environment, attribute, elements, key, LiteralKind.STRING);
        if (literal != null) {
            String symbol = literal.toStringValue();
            T value = find(options, symbol);
            if (value == null) {
                environment.report(new Diagnostic(
                        Level.ERROR,
                        literal,
View Full Code Here


                        "@{0}.{1} must be a string literal",
                        TARGET_NAME,
                        ELEMENT_NAME));
                return null;
            }
            return literal.toStringValue();
        }
    }
}
View Full Code Here

            Map<String, AstAttributeElement> elements,
            String elementName,
            boolean mandatory) {
        AstLiteral literal = takeLiteral(environment, attribute, elements, elementName, LiteralKind.STRING, mandatory);
        if (literal != null) {
            return literal.toStringValue();
        }
        return null;
    }

    /**
 
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.