@Override public String name() { return param.name(); }
@Override public String name() { return param.name(); }
@Override public String name() { return param.name(); }
/** * Get the Param name. First it checks if the annotated Param * includes a name, if not then it gets the name from the field. * If the parameter is a password, add the prefix and change the * name to upper case. * * @param param class annotation * @param annotated annotated field or method * @return the name of the param */ public static String getParamName(Param param, AnnotatedElement annotated) { String name = param.name(); if (name.equals("")) { if (annotated instanceof Field) { name = ((Field) annotated).getName(); } if (annotated instanceof Method) { if ( ((Method) annotated).getName().startsWith("is")) { name = ((Method) annotated).getName().substring(2); } else { name = ((Method) annotated).getName().substring(3); } name = Introspector.decapitalize(name); } } return name; }
/** * Get the Param name. First it checks if the annotated Param * includes a name, if not then it gets the name from the field. * If the parameter is a password, add the prefix and change the * name to upper case. * * @param param class annotation * @param annotated annotated field or method * @return the name of the param */ public static String getParamName(Param param, AnnotatedElement annotated) { String name = param.name(); if (name.equals("")) { if (annotated instanceof Field) { name = ((Field) annotated).getName(); } if (annotated instanceof Method) { if ( ((Method) annotated).getName().startsWith("is")) { name = ((Method) annotated).getName().substring(2); } else { name = ((Method) annotated).getName().substring(3); } name = Introspector.decapitalize(name); } } return name; }
Option(Param p, Field f) { final Class<?> ftype = f.getType(); name = p.name(); if(!ok(name)) { name = f.getName(); } required = !p.optional(); operand = p.primary(); defaultValue = p.defaultValue(); type = ftype; } @Override
paramValueStr = getParameterValue(parameters, param.name(), true);