private static List<MethodParameterDto> _getMethodParams(Method method) {
        List<MethodParameterDto> result = new ArrayList<>();
        Annotation[][] parameterAnnotations = method.getParameterAnnotations();
        Class<?>[] parameterTypes = method.getParameterTypes();

        for (int i = 0; i < parameterTypes.length; i++) {
            Class<?> parameterType = parameterTypes[i];
            Annotation[] annotations = parameterAnnotations[i];

            if (annotations.length > 0) {
            	
            	if (Context.class.isAssignableFrom(annotations[0].getClass())) {
                	continue;
                }
            	
            	MethodParameterDto param = new MethodParameterDto();
                for (int j = 0; j < annotations.length; j++) {
                    Annotation annotation = annotations[j];
                        
                    if (QueryParam.class.isAssignableFrom(annotation.getClass())) {
                        QueryParam queryParam = QueryParam.class.cast(annotation);

                        param.setName(queryParam.value());
                        param.setParamType("query");
                    } else if (FormParam.class.isAssignableFrom(annotation.getClass())) {
                        FormParam queryParam = FormParam.class.cast(annotation);

                        param.setName(queryParam.value());
                        param.setParamType("form");
                    } else if (PathParam.class.isAssignableFrom(annotation.getClass())) {
                        PathParam queryParam = PathParam.class.cast(annotation);

                        param.setName(queryParam.value());
                        param.setParamType("path");
                    } else if (DefaultValue.class.isAssignableFrom(annotation.getClass())) {
                    	DefaultValue defaultValue = DefaultValue.class.cast(annotation);
                    	
                    	param.setDefaultValue(defaultValue.value());
                    }
                    
                    try {
                        if (BaseDto.class.isAssignableFrom(parameterType)) {
                            param.setSchema(BaseDto.class.cast(parameterType.newInstance()).createExample());
                        }
                    } catch (Exception ex) {
                        param.setSchema(parameterType);
                    }

                    String paramName = parameterType.getSimpleName().toLowerCase();
                    param.setDataType(paramName.toLowerCase().replaceAll("dto", ""));
                }
                
                result.add(param);
            } else {
            	MethodParameterDto param = new MethodParameterDto();
                String paramName = parameterType.getSimpleName().toLowerCase();

                param.setDataType(paramName.toLowerCase().replaceAll("dto", ""));
                param.setName("body");
                param.setParamType("body");
                try {
                    if (BaseDto.class.isAssignableFrom(parameterType)) {
                        param.setSchema(BaseDto.class.cast(parameterType.newInstance()).createExample());
                    }
                } catch (Exception ex) {
                    param.setSchema(parameterType);
                }
                result.add(param);
            } // end if-else
        } // end for
        return result;
    }
private static List < MethodParameterDto > _getMethodParams ( Method method ) { List < MethodParameterDto > result = new ArrayList < > ( ) ; Annotation [ ] [ ] parameterAnnotations = method . getParameterAnnotations ( ) ; Class < ? > [ ] parameterTypes = method . getParameterTypes ( ) ; for ( int i = 0 ; i < parameterTypes . length ; i ++ ) { Class < ? > parameterType = parameterTypes [ i ] ; Annotation [ ] annotations = parameterAnnotations [ i ] ; if ( annotations . length > 0 ) { if ( Context . class . isAssignableFrom ( annotations [ 0 ] . getClass ( ) ) ) { continue ; } MethodParameterDto param = new MethodParameterDto ( ) ; for ( int j = 0 ; j < annotations . length ; j ++ ) { Annotation annotation = annotations [ j ] ; if ( QueryParam . class . isAssignableFrom ( annotation . getClass ( ) ) ) { QueryParam queryParam = QueryParam . class . cast ( annotation ) ; param . setName ( queryParam . value ( ) ) ; param . setParamType ( "query" ) ; } else if ( FormParam . class . isAssignableFrom ( annotation . getClass ( ) ) ) { FormParam queryParam = FormParam . class . cast ( annotation ) ; param . setName ( queryParam . value ( ) ) ; param . setParamType ( "form" ) ; } else if ( PathParam . class . isAssignableFrom ( annotation . getClass ( ) ) ) { PathParam queryParam = PathParam . class . cast ( annotation ) ; param . setName ( queryParam . value ( ) ) ; param . setParamType ( "path" ) ; } else if ( DefaultValue . class . isAssignableFrom ( annotation . getClass ( ) ) ) { DefaultValue defaultValue = DefaultValue . class . cast ( annotation ) ; param . setDefaultValue ( defaultValue . value ( ) ) ; } try { if ( BaseDto . class . isAssignableFrom ( parameterType ) ) { param . setSchema ( BaseDto . class . cast ( parameterType . newInstance ( ) ) . createExample ( ) ) ; } } catch ( Exception ex ) { param . setSchema ( parameterType ) ; } String paramName = parameterType . getSimpleName ( ) . toLowerCase ( ) ; param . setDataType ( paramName . toLowerCase ( ) . replaceAll ( "dto" , "" ) ) ; } result . add ( param ) ; } else { MethodParameterDto param = new MethodParameterDto ( ) ; String paramName = parameterType . getSimpleName ( ) . toLowerCase ( ) ; param . setDataType ( paramName . toLowerCase ( ) . replaceAll ( "dto" , "" ) ) ; param . setName ( "body" ) ; param . setParamType ( "body" ) ; try { if ( BaseDto . class . isAssignableFrom ( parameterType ) ) { param . setSchema ( BaseDto . class . cast ( parameterType . newInstance ( ) ) . createExample ( ) ) ; } } catch ( Exception ex ) { param . setSchema ( parameterType ) ; } result . add ( param ) ; } } return result ; }
~ Methods **************************************************************************************************************************************