public static boolean isJdk(Class<?> cls){
  if (cls.isPrimitive())   return true;
  String s=cls.getName();
  return s.startsWith("java.") || s.startsWith("javax.");
}

public static boolean isJdk ( Class < ? > cls ) { if ( cls . isPrimitive ( ) ) return true ; String s = cls . getName ( ) ; return s . startsWith ( "java." ) || s . startsWith ( "javax." ) ; }
check if given class is of jdk type .
