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

io.quarkus.bootstrap.resolver.maven.DependencyLoggingConfig Maven / Gradle / Ivy

There is a newer version: 3.17.0.CR1
Show newest version
package io.quarkus.bootstrap.resolver.maven;

import java.util.function.Consumer;

public class DependencyLoggingConfig {

    public static Builder builder() {
        return new DependencyLoggingConfig().new Builder();
    }

    public class Builder {

        private boolean built;

        private Builder() {
        }

        public Builder setGraph(boolean graph) {
            if (!built) {
                DependencyLoggingConfig.this.graph = graph;
            }
            return this;
        }

        public Builder setVerbose(boolean verbose) {
            if (!built) {
                DependencyLoggingConfig.this.verbose = verbose;
            }
            return this;
        }

        public Builder setMessageConsumer(Consumer msgConsumer) {
            if (!built) {
                DependencyLoggingConfig.this.msgConsumer = msgConsumer;
            }
            return this;
        }

        public DependencyLoggingConfig build() {
            if (!built) {
                built = true;
                if (msgConsumer == null) {
                    throw new IllegalArgumentException("msgConsumer has not been initialized");
                }
            }
            return DependencyLoggingConfig.this;
        }
    }

    private boolean verbose;
    private boolean graph;
    private Consumer msgConsumer;

    public boolean isGraph() {
        return graph;
    }

    public boolean isVerbose() {
        return verbose;
    }

    public Consumer getMessageConsumer() {
        return msgConsumer;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy