Package com.asakusafw.dmdl.model

Examples of com.asakusafw.dmdl.model.AstName


    }

    private Name getNamespace(ModelDeclaration model) {
        assert model != null;
        NamespaceTrait trait = model.getTrait(NamespaceTrait.class);
        AstName name;
        if (trait == null) {
            name = new AstSimpleName(null, NameConstants.DEFAULT_NAMESPACE);
        } else {
            name = trait.getNamespace();
        }
View Full Code Here


    }

    private static AstName toName(String name) {
        assert name != null;
        String[] segments = name.split("\\.");
        AstName current = toSimpleName(segments[0]);
        for (int i = 1; i < segments.length; i++) {
            current = new AstQualifiedName(null, current, toSimpleName(segments[i]));
        }
        return current;
    }
View Full Code Here

    @Override
    public void process(
            DmdlSemantics environment,
            ModelDeclaration declaration,
            AstAttribute attribute) {
        AstName name = getName(environment, attribute);
        if (name != null) {
            declaration.putTrait(
                    NamespaceTrait.class,
                    new NamespaceTrait(attribute, name));
        }
View Full Code Here

TOP

Related Classes of com.asakusafw.dmdl.model.AstName

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.