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

io.smallrye.graphql.schema.model.Argument Maven / Gradle / Ivy

package io.smallrye.graphql.schema.model;

/**
 * Represent an argument that is used on operations.
 * It's just a field with extra information to hold the
 * Java method argument Name
 *
 * @see Field
 *
 * @author Phillip Kruger ([email protected])
 */
public final class Argument extends Field {

    private String methodArgumentName; // This is the java method argument name
    private boolean sourceArgument = false; // Flag if this is a source argument

    public Argument() {
    }

    public Argument(String methodArgumentName, String methodName, String propertyName, String name, Reference reference) {
        super(methodName, propertyName, name, reference);
        this.methodArgumentName = methodArgumentName;
    }

    public String getMethodArgumentName() {
        return methodArgumentName;
    }

    public void setMethodArgumentName(String methodArgumentName) {
        this.methodArgumentName = methodArgumentName;
    }

    public void setSourceArgument(boolean sourceArgument) {
        this.sourceArgument = sourceArgument;
    }

    public boolean isSourceArgument() {
        return sourceArgument;
    }

    @Override
    public String toString() {
        return "Argument{" + "methodArgumentName=" + methodArgumentName + ", sourceArgument=" + sourceArgument + '}';
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy