looks for methods that contain a GETFIELD or PUTFIELD opcodes

@param method
the context object of the current method
@return if the class uses GETFIELD or PUTFIELD
182670
private boolean prescreen(Method method) {
        BitSet bytecodeSet = getClassContext().getBytecodeSet(method);
        return (bytecodeSet != null) && (bytecodeSet.get(Const.PUTFIELD) || bytecodeSet.get(Const.GETFIELD));
    }
425337
public boolean isConsiderateMethod(Method method) {
		if (method.isAnnotationPresent(TransientDataService.class) || method.isAnnotationPresent(WsDataService.class) || method.getDeclaringClass().isAssignableFrom(Object.class)) {
			return false;
		}
		int modifiers = method.getModifiers();
		return Modifier.isPublic(modifiers) && !Modifier.isStatic(modifiers);
	}
974941
public MethodDoc getMatchingMethod(MethodDoc method, MethodFinder mf) {

        MethodDoc md = getMatchingMethod(method);
        if (md != null) {
            if (mf.checkMethod(md)) {
                return md;
            }
        }

        return null;
    }
842529
public MethodInfo addMethod(Method method) {
        Modifiers modifiers = new Modifiers(method.getModifiers());
        modifiers.setAbstract(this.getModifiers().isInterface());

        TypeVariableDesc[] typeParams = lookupTypeVariables(method);
        TypeDesc ret = TypeDesc.forClass(method.getReturnType(),
                                         method.getGenericReturnType());

        MethodDescriptor methodDescriptor = lookupMethodDescriptor(method);

        Class<?>[] paramClasses = method.getParameterTypes();
        Type[] paramTypes = method.getGenericParameterTypes();
        TypeDesc[] params = new TypeDesc[paramClasses.length];
        String[] paramNames = new String[paramClasses.length];
        for (int i = 0; i < paramClasses.length; i++) {
            params[i] = TypeDesc.forClass(paramClasses[i], paramTypes[i]);
            if(methodDescriptor != null) {
                paramNames[i] =
                    methodDescriptor.getParameterDescriptors()[i].getName();
            } else {
                paramNames[i] = "param$" + i;
            }
        }

        MethodInfo mi = addMethod(modifiers, method.getName(), typeParams,
                                  ret, params, paramNames);

        // exception stuff...
        // TODO: generic exceptions
        Class<?>[] exceptions = method.getExceptionTypes();
        for (int i=0; i<exceptions.length; i++) {
            mi.addException(exceptions[i].getName());
        }

        return mi;
    }
533616
private static Optional<StandardMethod> maybeStandardMethod(ExecutableElement method) {
    String methodName = method.getSimpleName().toString();
    if (methodName.equals("equals")) {
      if (method.getParameters().size() == 1
          && method.getParameters().get(0).asType().toString().equals("java.lang.Object")) {
        return Optional.of(StandardMethod.EQUALS);
      } else {
        return Optional.empty();
      }
    } else if (methodName.equals("hashCode")) {
      if (method.getParameters().isEmpty()) {
        return Optional.of(StandardMethod.HASH_CODE);
      } else {
        return Optional.empty();
      }
    } else if (methodName.equals("toString")) {
      if (method.getParameters().isEmpty()) {
        return Optional.of(StandardMethod.TO_STRING);
      } else {
        return Optional.empty();
      }
    } else {
      return Optional.empty();
    }
  }
591394
public static boolean checkMethodSignature(final Method method, final List<WaveItem<?>> wParams) {
        boolean isCompliant = false;

        final Type[] mParams = method.getGenericParameterTypes();

        if (wParams.isEmpty() && Wave.class.isAssignableFrom(ClassUtility.getClassFromType(mParams[0]))) {
            isCompliant = true;
        } else if (mParams.length - 1 == wParams.size()) {

            // Flag used to skip a method not compliant
            boolean skipMethod = false;
            // Check each parameter
            for (int i = 0; !skipMethod && i < mParams.length - 1 && !isCompliant; i++) {
                if (!ClassUtility.getClassFromType(mParams[i]).isAssignableFrom(ClassUtility.getClassFromType(wParams.get(i).type()))) {
                    // This method has not the right parameters
                    skipMethod = true;
                }
                if (i == mParams.length - 2
                        && Wave.class.isAssignableFrom(ClassUtility.getClassFromType(mParams[i + 1]))) {
                    // This method is compliant with wave type
                    isCompliant = true;
                }
            }
        }
        return isCompliant;
    }
1226713
private static boolean containsMethod(Method method, List<Method> methods) {
    if(methods != null) {
      for(Method aMethod : methods){
        if(method.getName().equals(aMethod.getName())) {
          return true;
        }
      }
    }
    return false;
  }
1167797
public void setMethodDefaults(String method)
  {
        String defaultMethod = m_properties.getProperty(OutputKeys.METHOD);
 
        if((null == defaultMethod) || !defaultMethod.equals(method)
         // bjm - add the next condition as a hack
         // but it is because both output_xml.properties and
         // output_unknown.properties have the same method=xml
         // for their default. Otherwise we end up with
         // a ToUnknownStream wraping a ToXMLStream even
         // when the users says method="xml"
         //
         || defaultMethod.equals("xml")
         )
        {
            Properties savedProps = m_properties;
            Properties newDefaults = 
                OutputPropertiesFactory.getDefaultMethodProperties(method);
            m_properties = new Properties(newDefaults);
            copyFrom(savedProps, false);
        }
  }
1182856
static boolean isJavaPropertyMethod(final String methodName) {
        return (methodName.length() > PROPERTY_METHOD_PREFIX_LEN
                && (methodName.startsWith("get") || methodName.startsWith(("set"))));
    }
1205320
private boolean prescreen(Method method) {
        BitSet bytecodeSet = getClassContext().getBytecodeSet(method);
        return (bytecodeSet != null) && (bytecodeSet.get(Const.CHECKCAST));
    }
727269
private static boolean isPublicInstanceMethod(Method method)
    {
        return Modifier.isPublic(method.getModifiers()) &&
            !Modifier.isStatic(method.getModifiers());
    }
407211
Class getMethodMapClass(Method method) {

        Class origMapClass = method.getDeclaringClass();
        Class mapClass = origMapClass;
        while (mapClass != null && !isValidMapClass(mapClass)) {
            mapClass = mapClass.getDeclaringClass();
        }
        if (mapClass == null) {
            mapClass = origMapClass;
        }
        return mapClass;
    }
1053219
public static Field getFieldFromMethod(Method method, Field[] expectedFields, DisConfigTypeEnum disConfigTypeEnum) {

        String fieldName;

        if (disConfigTypeEnum.equals(DisConfigTypeEnum.FILE)) {

            DisconfFileItem disconfFileItem = method.getAnnotation(DisconfFileItem.class);
            // 根据用户设定的注解来获取
            fieldName = disconfFileItem.associateField();

        } else {

            DisconfItem disItem = method.getAnnotation(DisconfItem.class);
            // 根据用户设定的注解来获取
            fieldName = disItem.associateField();
        }

        //
        // 如果用户未设定注解，则猜其名字
        //
        if (StringUtils.isEmpty(fieldName)) {
            // 从方法名 获取其 Field 名
            fieldName = ClassUtils.getFieldNameByGetMethodName(method.getName());
        }

        // 确认此Field名是正确的
        for (Field field : expectedFields) {

            if (field.getName().equals(fieldName)) {
                return field;
            }
        }

        LOGGER.error(method.toString() + " cannot get its related field name. ");

        return null;
    }
1320929
public static Method setAccessible(Method method) {
		if (null != method && false == method.isAccessible()) {
			method.setAccessible(true);
		}
		return method;
	}
148525
public String getMethodName(Method method) {
        String name;
        if (ClassUtils.isBooleanGetter(method)) {
            name = extractMethodName(method, 2);
        } else {
            name = extractMethodName(method, 3);
        }
        return name;
    }
1253331
public Method getMethod(Method method) {
        return getMethod(method.getReturnType(), method.getName(), method.getParameterTypes());
    }
581192
private boolean isGetterOrSetter(Method method) {
        try {
            String methodName = method.getName();
            return methodName.startsWith("get") || methodName.startsWith("is") || methodName.startsWith("set") || "clearWarnings".equals(methodName);
        } catch (Exception ex) {
            return false; // just in case, better be safe than sorry
        }
    }