Gets field name from method.

@param m the m
@return the field name from method
164504
public static String getFieldNameFromMethod(Method m) {
        String methodName = m.getName();

        if (methodName.startsWith(GET_METHOD_PREFIX)) {
            methodName = methodName.replaceFirst(GET_METHOD_PREFIX, "");
        } else if (methodName.startsWith(IS_METHOD_PREFIX)) {
            methodName = methodName.replaceFirst(IS_METHOD_PREFIX, "");
        } else if (methodName.startsWith(SET_METHOD_PREFIX)) {
            methodName = methodName.replaceFirst(SET_METHOD_PREFIX, "");
        }

        return methodName.substring(0, 1).toLowerCase() + methodName.substring(1);

    }
455750
public static String getDesc(final Method m) {
		StringBuilder ret = new StringBuilder(m.getName()).append('(');
		Class<?>[] parameterTypes = m.getParameterTypes();
		for (int i = 0; i < parameterTypes.length; i++)
			ret.append(getDesc(parameterTypes[i]));
		ret.append(')').append(getDesc(m.getReturnType()));
		return ret.toString();
	}
1176850
public static String getFieldName(Field field) {
        String name = field.getName();
        String formattedName = Formatter.toCamelCase(name);
        if (isReservedKeyword(formattedName)) {
            return formattedName + '_';
        }
        return formattedName;
    }
1020820
public static String[] getFieldNames(Class clazz) {
	Field[] fields = clazz.getFields();
	String[] names = new String[fields.length];
	for (int i = 0; i < names.length; i++) {
	    names[i] = fields[i].getName();
	}
	return names;
    }
828653
public static String[] getMethodParamNames(final Method m) {
        if (METHOD_NAMES_POOL.containsKey(m)) return METHOD_NAMES_POOL.get(m);

        final String[] paramNames = new String[m.getParameterTypes().length];
        final String   n          = m.getDeclaringClass().getName();
        ClassReader    cr;
        try {
            cr = new ClassReader(n);
        } catch (IOException e) {
            return null;
        }
        cr.accept(new ClassVisitor(Opcodes.ASM5) {
            @Override
            public MethodVisitor visitMethod(final int access, final String name, final String desc, final String signature, final String[] exceptions) {
                final Type[] args = Type.getArgumentTypes(desc);
                // The method name is the same and the number of parameters is the same
                if (!name.equals(m.getName()) || !sameType(args, m.getParameterTypes())) {
                    return super.visitMethod(access, name, desc, signature, exceptions);
                }
                MethodVisitor v = super.visitMethod(access, name, desc, signature, exceptions);
                return new MethodVisitor(Opcodes.ASM5, v) {
                    @Override
                    public void visitLocalVariable(String name, String desc, String signature, Label start, Label end, int index) {
                        int i = index - 1;
                        // if it is a static method, the first is the parameter
                        // if it's not a static method, the first one is "this" and then the parameter of the method
                        if (Modifier.isStatic(m.getModifiers())) {
                            i = index;
                        }
                        if (i >= 0 && i < paramNames.length) {
                            paramNames[i] = name;
                        }
                        super.visitLocalVariable(name, desc, signature, start, end, index);
                    }
                };
            }
        }, 0);
        METHOD_NAMES_POOL.put(m, paramNames);
        return paramNames;
    }
204691
public MLArray getField(String name, int m, int n)
    {
        return getField(name, getIndex(m,n) );
    }
272647
protected String getFieldNameOfAccesser(String methodName) {
		if (methodName.startsWith("get")) {
			return net.winroad.wrdoclet.utils.Util.uncapitalize(methodName.replaceFirst("get", ""));
		} else if (methodName.startsWith("set")) {
			return net.winroad.wrdoclet.utils.Util.uncapitalize(methodName.replaceFirst("set", ""));
		} else {
			return net.winroad.wrdoclet.utils.Util.uncapitalize(methodName.replaceFirst("is", ""));
		}
	}
509815
public String getModificationTerm(ModificationFeature mf)
	{
		Set vals = TERM_ACC.getValueFromBean(mf);
		if (vals.isEmpty()) return null;
		return vals.iterator().next().toString();
	}
775449
public String getName() {
		if (m_strFieldName != null)
			return m_strFieldName;

		String str;

		if (m_strGetName != null)
			str = m_strGetName + "()|";
		else
			str = "|";

		if (m_strSetName != null)
			return str + m_strSetName;

		return str;
	}
294952
public Field getField(String name) {
    FieldInfo fieldInfo = getFieldInfo(name);
    return fieldInfo == null ? null : fieldInfo.getField();
  }
193492
protected String getMethodSignature(MethodDeclaration m) {
    StringBuilder sb = new StringBuilder();
    ExecutableElement element = m.getExecutableElement();
    char prefix = Modifier.isStatic(m.getModifiers()) ? '+' : '-';
    String returnType = nameTable.getObjCType(element.getReturnType());
    String selector = nameTable.getMethodSelector(element);
    if (m.isConstructor()) {
      returnType = "instancetype";
    } else if (selector.equals("hash")) {
      // Explicitly test hashCode() because of NSObject's hash return value.
      returnType = "NSUInteger";
    }
    sb.append(UnicodeUtils.format("%c (%s%s)", prefix, returnType, nullability(element)));

    List<SingleVariableDeclaration> params = m.getParameters();
    String[] selParts = selector.split(":");

    if (params.isEmpty()) {
      assert selParts.length == 1 && !selector.endsWith(":");
      sb.append(selParts[0]);
    } else {
      assert params.size() == selParts.length;
      int baseLength = sb.length() + selParts[0].length();
      for (int i = 0; i < params.size(); i++) {
        if (i != 0) {
          sb.append('\n');
          sb.append(pad(baseLength - selParts[i].length()));
        }
        VariableElement var = params.get(i).getVariableElement();
        String typeName = nameTable.getObjCType(var.asType());
        sb.append(
            UnicodeUtils.format(
                "%s:(%s%s)%s",
                selParts[i], typeName, nullability(var), nameTable.getVariableShortName(var)));
      }
    }

    return sb.toString();
  }
28834
public static String propertyName(Method method) {
        if (!is(method)) {
            throw new IllegalArgumentException("Method: " + method + " is not a real getter.");
        }
        String name = method.getName();

        if (name.startsWith(GET_PREFIX)) {
            return name.substring(GET_PREFIX.length());
        } else if (name.startsWith(IS_PREFIX)) {
            return name.substring(IS_PREFIX.length());
        } else if (name.startsWith(SHOULD_PREFIX)) {
            name = name.substring(SHOULD_PREFIX.length());
        } else {
            throw new IllegalStateException("Method: " + method + " is a getter but couldn't find a valid prefix.");
        }

        if (name.length() == 1) {
            return name.toUpperCase();
        }
        return name.substring(0, 1).toUpperCase() + name.substring(1);
    }
1095951
private String getPropertyName(Method method)
   {
      String result = method.getName();
      if (result.startsWith("get"))
      {
         result = result.substring(3);
      }
      return result;
   }
852309
private static String getParameterName(Method m, int paramIndex) {
        PName pName = getParameterAnnotation(m, paramIndex, PName.class);
        if (pName != null) {
            return pName.value();
        } else {
            return "";
        }
    }
1115446
public static String getParameterName(Parameter parameter) {
        // identify parameter name and pattern from method signature
        String methodParameterName = parameter.getName();
        if (parameter.isAnnotationPresent(Param.class)) {
            Param param = parameter.getAnnotation(Param.class);
            if (!Strings.isNullOrEmpty(param.value())) {
                methodParameterName = param.value();
            }
        }
        return methodParameterName;
    }
354186
private static String getMethodNameForField(final String prefix, final String fieldName) {
		return prefix + fieldName.substring(0, 1).toUpperCase() + fieldName.substring(1);
	}
37041
public static String getMapSetterName(Field field) {
        if (field.isMap()) {
            return SETTER_PREFIX + Formatter.toPascalCase(field.getName()) + MAP_SUFFIX;
        }
        throw new IllegalArgumentException(field.toString());
    }