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

net.jbock.writing.HasCommandRepresentation Maven / Gradle / Ivy

There is a newer version: 5.18
Show newest version
package net.jbock.writing;

import io.jbock.javapoet.ClassName;
import io.jbock.javapoet.FieldSpec;
import net.jbock.annotated.Option;
import net.jbock.annotated.Parameter;
import net.jbock.annotated.VarargsParameter;
import net.jbock.convert.Mapping;
import net.jbock.processor.SourceElement;

import java.util.List;
import java.util.Optional;

abstract class HasCommandRepresentation {

    private final CommandRepresentation commandRepresentation;

    HasCommandRepresentation(CommandRepresentation commandRepresentation) {
        this.commandRepresentation = commandRepresentation;
    }

    final List> namedOptions() {
        return commandRepresentation.namedOptions();
    }

    final SourceElement sourceElement() {
        return commandRepresentation.sourceElement();
    }

    final ClassName optType() {
        return commandRepresentation.optType();
    }

    final FieldSpec optionNames() {
        return commandRepresentation.optionNames();
    }

    final List> positionalParameters() {
        return commandRepresentation.positionalParameters();
    }

    final Optional> varargsParameter() {
        return commandRepresentation.varargsParameter();
    }

    final List> allMappings() {
        return commandRepresentation.allMappings();
    }

    final boolean isSuperCommand() {
        return commandRepresentation.sourceElement().isSuperCommand();
    }

    final boolean parseOrExitMethodAcceptsList() {
        return commandRepresentation.sourceElement().parseOrExitMethodAcceptsList();
    }

    final boolean enableAtFileExpansion() {
        return commandRepresentation.sourceElement().enableAtFileExpansion();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy