Here you can find the source of isBoolean(Class returnType)
public static boolean isBoolean(Class returnType)
//package com.java2s; //License from project: Apache License import java.util.concurrent.atomic.AtomicBoolean; public class Main { public static boolean isBoolean(String str) { if (str != null && (str.equals("true") || str.equals("false"))) { return true; }//from w ww .j a va 2 s . co m return false; } public static boolean isBoolean(Class returnType) { return (returnType == Boolean.class || returnType == boolean.class || returnType == AtomicBoolean.class); } }