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

colesico.framework.rpc.codegen.model.RpcApiParamElement Maven / Gradle / Ivy

The newest version!
package colesico.framework.rpc.codegen.model;

import colesico.framework.assist.codegen.model.ParameterElement;
import colesico.framework.service.codegen.model.teleapi.TeleParameterElement;

import javax.lang.model.type.TypeMirror;

/**
 * RPC API method parameter element
 */
public class RpcApiParamElement {
    private final ParameterElement originParam;
    private RpcApiMethodElement parentMethod;

    /**
     * Parameter index 0..N
     */
    private final Integer paramIndex;

    /**
     * Bound tele param
     */
    private TeleParameterElement teleParam;

    public RpcApiParamElement(ParameterElement originParam, Integer paramIndex) {
        this.originParam = originParam;
        this.paramIndex = paramIndex;
    }

    public String getterName() {
        return "getParam" + paramIndex;
    }

    public String setterName() {
        return "setParam" + paramIndex;
    }

    public String fieldName() {
        return "param" + paramIndex;
    }

    public TypeMirror getParamType() {
        return originParam.getOriginType();
    }

    public ParameterElement getOriginParam() {
        return originParam;
    }

    public RpcApiMethodElement getParentMethod() {
        return parentMethod;
    }

    public void setParentMethod(RpcApiMethodElement parentMethod) {
        this.parentMethod = parentMethod;
    }

    public TeleParameterElement getTeleParam() {
        return teleParam;
    }

    public void setTeleParam(TeleParameterElement teleParam) {
        this.teleParam = teleParam;
    }

    public Integer getParamIndex() {
        return paramIndex;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy