All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.descoped.dc.api.node.builder.ConsoleBuilder Maven / Gradle / Ivy

There is a newer version: 2.0.4
Show newest version
package io.descoped.dc.api.node.builder;

import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import io.descoped.dc.api.node.Base;
import io.descoped.dc.api.node.Configurations;
import io.descoped.dc.api.node.Console;
import io.descoped.dc.api.node.Node;

import java.util.Iterator;

@JsonDeserialize(using = NodeBuilderDeserializer.class)
public class ConsoleBuilder extends NodeBuilder {

    public ConsoleBuilder() {
        super(BuilderType.Console);
    }

    @Override
     R build(BuildContext buildContext) {
        return (R) new ConsoleNode(buildContext.getInstance(SpecificationBuilder.GLOBAL_CONFIGURATION));
    }

    @Override
    public String toString() {
        return "ConsoleBuilder{}";
    }

    static class ConsoleNode extends FlowNode implements Console {

        public ConsoleNode(Configurations configurations) {
            super(configurations);
        }

        @Override
        public void log() {

        }

        @Override
        public Iterator iterator() {
            return createNodeList().iterator();
        }

        @Override
        public String toString() {
            return "ConsoleNode{}";
        }
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy