メソッドがプリミティブ型のbooleanに対するgetterの書式かどうか判定する。
<ol>
<li>メソッド名が'is'か始まっていること。</li>
<li>メソッド名が3文字以上であること。</li>
<li>引数がないこと。</li>
<li>戻り値がプリミティブのboolean型であること。</li>
</ol>

@param method メソッド情報
@return trueの場合はboolean型のgetterメソッドである。
333411
public static boolean isBooleanGetterMethod(final Method method) {
        
        final String methodName = method.getName();
        if(!methodName.startsWith("is")) {
            return false;
            
        } else if(methodName.length() <= 2) {
            return false;
        }
        
        if(method.getParameterCount() > 0) {
            return false;
        }
        
        if(!isPrimitiveBoolean(method.getReturnType())) {
            return false;
        }
        
        return true;
    }
40615
private static boolean checkParameters(Method method, Object... data)
	{
		Parameter[] parameters = method.getParameters();
		if (ArrayUtils.isEmpty(data) && parameters.length != 0)
			return false;
		if (parameters.length != data.length)
			return false;

		for (int i = 0; i < parameters.length; i++)
		{
			Class<?> paramClass = parameters[i].getType();
			if (data[i] != null)
			{
				Class<?> dataClass = data[i].getClass();
				if (!ClassUtils.isAssignable(dataClass, paramClass, true))
					return false;
			}
		}

		return true;
	}
1165941
private static boolean isDesignerMethod(Method method) {
        Class<?>[] parameterTypes = method.getParameterTypes();

        for (Class<?> parameterType : parameterTypes) {
            if (parameterType.isAssignableFrom(TestDesigner.class)) {
                return true;
            }
        }

        return false;
    }
812168
public static boolean isGetterMethod(ClassContext classContext, Method method) {
        MethodGen methodGen = classContext.getMethodGen(method);
        if (methodGen == null) {
            return false;
        }
        InstructionList il = methodGen.getInstructionList();
        // System.out.println("Checking getter method: " + method.getName());
        if (il.getLength() > 60) {
            return false;
        }

        int count = 0;
        Iterator<InstructionHandle> it = il.iterator();
        while (it.hasNext()) {
            InstructionHandle ih = it.next();
            switch (ih.getInstruction().getOpcode()) {
            case Const.GETFIELD:
                count++;
                if (count > 1) {
                    return false;
                }
                break;
            case Const.PUTFIELD:
            case Const.BALOAD:
            case Const.CALOAD:
            case Const.DALOAD:
            case Const.FALOAD:
            case Const.IALOAD:
            case Const.LALOAD:
            case Const.SALOAD:
            case Const.AALOAD:
            case Const.BASTORE:
            case Const.CASTORE:
            case Const.DASTORE:
            case Const.FASTORE:
            case Const.IASTORE:
            case Const.LASTORE:
            case Const.SASTORE:
            case Const.AASTORE:
            case Const.PUTSTATIC:
                return false;
            case Const.INVOKESTATIC:
            case Const.INVOKEVIRTUAL:
            case Const.INVOKEINTERFACE:
            case Const.INVOKESPECIAL:
            case Const.GETSTATIC:
                // no-op

            }
        }
        // System.out.println("Found getter method: " + method.getName());
        return true;
    }
1303756
@Override
    public boolean choose(XMethod method) {
        for (JavaClassAndMethodChooser chooser : conjunctList) {
            if (!chooser.choose(method)) {
                return false;
            }
        }
        return true;
    }
29538
private boolean isDeprecated( JavaMethod method )
    {
        if ( method == null )
            return false;

        for ( Annotation annotation : method.getAnnotations() )
        {
            if ( "java.lang.Deprecated".equals( annotation.getType().getFullyQualifiedName() ) )
            {
                return true;
            }
        }

        return method.getTagByName( "deprecated" ) != null;
    }
685607
public static String parsePropertyName(Method method) {
    String name = method.getName();
    int i = 0;
    if (name.startsWith("get") || name.startsWith("set")) {
      i = 3;
    } else if (name.startsWith("is")) {
      i = 2;
    }
    return Character.toLowerCase(name.charAt(i)) + name.substring(i + 1);
  }
901129
private boolean isObjectMethod(Method method) {
    for (Method objectMethod : Object.class.getMethods()) {
      if (method.getName().equals(objectMethod.getName())) {
        if (equalParamTypes(objectMethod.getParameterTypes(), method.getParameterTypes())) {
          return true;
        }
      }
    }

    return false;
  }
1118523
private boolean methodIsAbstractGetter(TypeElement valueType, ExecutableElement method) {
    Set<Modifier> modifiers = method.getModifiers();
    if (!modifiers.contains(Modifier.ABSTRACT)) {
      return false;
    }
    boolean declaredOnValueType = method.getEnclosingElement().equals(valueType);
    TypeMirror returnType = getReturnType(valueType, method, types);
    if (returnType.getKind() == TypeKind.VOID || !method.getParameters().isEmpty()) {
      if (declaredOnValueType) {
        messager.printMessage(
            ERROR,
            "Only getter methods may be declared abstract on FreeBuilder types",
            method);
      } else {
        printNoImplementationMessage(valueType, method);
      }
      return false;
    }
    return true;
  }
1336763
public static String mangleName(Method method, boolean isFull)
    {
        StringBuffer sb = new StringBuffer();

        sb.append(method.getName());

        Class[] params = method.getParameterTypes();
        for (int i = 0; i < params.length; i++) {
            sb.append('_');
            sb.append(mangleClass(params[i], isFull));
        }

        return sb.toString();
    }
243872
public boolean matches(String method, String uri) {
        return matches(HttpMethod.from(method), uri);
    }
727269
private static boolean isPublicInstanceMethod(Method method)
    {
        return Modifier.isPublic(method.getModifiers()) &&
            !Modifier.isStatic(method.getModifiers());
    }
1000418
private boolean httpMethodSupportsBody(HttpMethod method) {
        return HttpMethod.POST.equals(method) || HttpMethod.PUT.equals(method)
                || HttpMethod.DELETE.equals(method) || HttpMethod.PATCH.equals(method);
    }
1150495
public static boolean isAnEntryPoint(Method method, boolean scanEntryPointAnnotation) {
		return !scanEntryPointAnnotation
			|| scanEntryPointAnnotation && method.isAnnotationPresent(ExternalEntryPoint.class)
			|| scanEntryPointAnnotation && method.getDeclaringClass().isAnnotationPresent(ExternalEntryPoint.class);
	}
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;
    }
634266
private boolean isIsGetter(AptMethod method) {
        String methodName = method.getName();

        if (methodName.length() < 3)
            return false;

        if (!methodName.startsWith("is"))
            return false;

        if (method.getArgList().length() > 0)
            return false;

        if (!"boolean".equals(method.getReturnType()))
            return false;

        return true;
    }
740701
protected static boolean isFinalizeMethod(Method method) {
        return method.getReturnType() == void.class && method.getParameterTypes().length == 0 &&
                method.getName().equals("finalize");
    }