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

poussecafe.doc.options.CustomDotExecutableOption Maven / Gradle / Ivy

There is a newer version: 0.29.0
Show newest version
package poussecafe.doc.options;

import java.util.List;
import java.util.Objects;
import java.util.Optional;
import jdk.javadoc.doclet.Doclet.Option;
import poussecafe.doc.PousseCafeDocletConfiguration;

import static java.util.Arrays.asList;

public class CustomDotExecutableOption implements Option {

    public CustomDotExecutableOption(PousseCafeDocletConfiguration.Builder configBuilder) {
        Objects.requireNonNull(configBuilder);
        this.configBuilder = configBuilder;
    }

    private PousseCafeDocletConfiguration.Builder configBuilder;

    @Override
    public int getArgumentCount() {
        return 1;
    }

    @Override
    public String getDescription() {
        return "Custom executable for GraphViz's dot";
    }

    @Override
    public Kind getKind() {
        return Kind.STANDARD;
    }

    @Override
    public List getNames() {
        return asList("-customDotExecutable");
    }

    @Override
    public String getParameters() {
        return "";
    }

    @Override
    public boolean process(String option,
            List arguments) {
        configBuilder.customDotExecutable(Optional.of(arguments.get(0)));
        return true;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy