Search in sources :

Example 1 with ModelParameter

use of com.iggroup.oss.restdoclet.doclet.type.ModelParameter in project RESTdoclet by IG-Group.

the class MethodBuilder method initModelParams.

/**
    * Initialises the model-parameters of this method.
    * 
    * @param params the method's parameters.
    * @param tags the parameters' Java documentation tags.
    */
private void initModelParams(Method method, final Parameter[] params, final ParamTag[] tags) {
    LOG.debug(method.getName());
    ArrayList<ModelParameter> modelParams = new ArrayList<ModelParameter>();
    for (Parameter param : params) {
        if (isAnnotated(param, ModelAttribute.class)) {
            modelParams.add(new ModelParameterBuilder().build(new ModelParameter(), param, tags));
        }
    }
    method.setModelParams(modelParams);
}
Also used : ModelParameter(com.iggroup.oss.restdoclet.doclet.type.ModelParameter) ArrayList(java.util.ArrayList) ModelParameter(com.iggroup.oss.restdoclet.doclet.type.ModelParameter) Parameter(com.sun.javadoc.Parameter) PathParameter(com.iggroup.oss.restdoclet.doclet.type.PathParameter) ResponseParameter(com.iggroup.oss.restdoclet.doclet.type.ResponseParameter) RestParameter(com.iggroup.oss.restdoclet.doclet.type.RestParameter) RequestParameter(com.iggroup.oss.restdoclet.doclet.type.RequestParameter) BodyParameter(com.iggroup.oss.restdoclet.doclet.type.BodyParameter)

Aggregations

BodyParameter (com.iggroup.oss.restdoclet.doclet.type.BodyParameter)1 ModelParameter (com.iggroup.oss.restdoclet.doclet.type.ModelParameter)1 PathParameter (com.iggroup.oss.restdoclet.doclet.type.PathParameter)1 RequestParameter (com.iggroup.oss.restdoclet.doclet.type.RequestParameter)1 ResponseParameter (com.iggroup.oss.restdoclet.doclet.type.ResponseParameter)1 RestParameter (com.iggroup.oss.restdoclet.doclet.type.RestParameter)1 Parameter (com.sun.javadoc.Parameter)1 ArrayList (java.util.ArrayList)1