Package com.asakusafw.utils.java.model.syntax

Examples of com.asakusafw.utils.java.model.syntax.Name


    public void generateResources(EmitContext context, ModelDeclaration model) throws IOException {
        if (isTarget(model) == false) {
            return;
        }
        checkPropertyType(model);
        Name supportName = generateFormat(context, model);
        generateImporter(context, model, supportName);
        generateExporter(context, model, supportName);
    }
View Full Code Here


    public TypeBuilder enclose(Name name) {
        if (name == null) {
            throw new IllegalArgumentException("name must not be null"); //$NON-NLS-1$
        }
        if (context.getModelKind() == ModelKind.NAMED_TYPE) {
            Name enclosed = Models.append(f, toNamedType().getName(), name);
            return chain(f.newNamedType(enclosed));
        } else {
            Type current = context;
            for (SimpleName segment : Models.toList(name)) {
                current = f.newQualifiedType(current, segment);
View Full Code Here

     */
    @Test
    public void Part_Ex1() {
        List<StageModel> stages = compile(RestructureFlowExtend.class);
        Fragment fragment = stages.get(0).getMapUnits().get(0).getFragments().get(0);
        Name name = fragment.getCompiled().getQualifiedName();

        ClassLoader loader = start();
        PortMapper mapper = new PortMapper(fragment);
        MockResult<Ex1> result = mapper.create("out");

View Full Code Here

     */
    @Test
    public void Ex1_Part() {
        List<StageModel> stages = compile(RestructureFlowProject.class);
        Fragment fragment = stages.get(0).getMapUnits().get(0).getFragments().get(0);
        Name name = fragment.getCompiled().getQualifiedName();

        ClassLoader loader = start();
        PortMapper mapper = new PortMapper(fragment);
        MockResult<Part1> result = mapper.create("out");

View Full Code Here

     */
    @Test
    public void Ex1_Ex2() {
        List<StageModel> stages = compile(RestructureFlowSame.class);
        Fragment fragment = stages.get(0).getMapUnits().get(0).getFragments().get(0);
        Name name = fragment.getCompiled().getQualifiedName();

        ClassLoader loader = start();
        PortMapper mapper = new PortMapper(fragment);
        MockResult<Ex2> result = mapper.create("out");

View Full Code Here

     */
    @Test
    public void Part1_Part2() {
        List<StageModel> stages = compile(RestructureFlowSimple.class);
        Fragment fragment = stages.get(0).getMapUnits().get(0).getFragments().get(0);
        Name name = fragment.getCompiled().getQualifiedName();

        ClassLoader loader = start();
        PortMapper mapper = new PortMapper(fragment);
        MockResult<Part2> result = mapper.create("out");

View Full Code Here

    public void generateResources(EmitContext context, ModelDeclaration model) throws IOException {
        if (isTarget(model) == false) {
            return;
        }
        checkPropertyType(model);
        Name supportName = generateFormat(context, model);
        generateImporter(context, model, supportName);
        generateExporter(context, model, supportName);
    }
View Full Code Here

    private Type reservePackageMember(SimpleName name) {
        assert name != null;
        if (packageDecl == null) {
            return resolver.factory.newNamedType(name);
        } else {
            Name qualified = Models.append(
                    resolver.factory,
                    packageDecl.getName(),
                    name);
            return resolver.factory.newNamedType(qualified);
        }
View Full Code Here

    }

    private Type reservePackageMember(QualifiedName name) {
        assert name != null;
        List<SimpleName> list = name.toNameList();
        Name current;
        Iterator<SimpleName> iter = list.iterator();
        assert iter.hasNext();
        SimpleName first = iter.next();
        if (packageDecl == null) {
            current = first;
View Full Code Here

     */
    @Test
    public void Ex1_Part() {
        List<StageModel> stages = compile(ProjectFlowSimple.class);
        Fragment fragment = stages.get(0).getMapUnits().get(0).getFragments().get(0);
        Name name = fragment.getCompiled().getQualifiedName();

        ClassLoader loader = start();
        PortMapper mapper = new PortMapper(fragment);
        MockResult<Part1> result = mapper.create("out");

View Full Code Here

TOP

Related Classes of com.asakusafw.utils.java.model.syntax.Name

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.