MetadataCreateUtils { static boolean isNativeJavaType(Class clazz) { if(clazz == null) return false; if(clazz.isArray()) return false; if(clazz.isPrimitive() || clazz.getName().startsWith("java.") || clazz.getName().startsWith("javax.")) { return true; } return false; }  static Table createTable(Class clazz);  }
@Test public void test() { assertTrue(MetadataCreateUtils.isNativeJavaType(int.class)); assertTrue(MetadataCreateUtils.isNativeJavaType(Integer.class)); assertTrue(MetadataCreateUtils.isNativeJavaType(Date.class)); assertTrue(MetadataCreateUtils.isNativeJavaType(Ref.class)); assertFalse(MetadataCreateUtils.isNativeJavaType(null)); assertFalse(MetadataCreateUtils.isNativeJavaType(AAA.class)); assertFalse(MetadataCreateUtils.isNativeJavaType(new Integer[]{}.getClass())); assertFalse(MetadataCreateUtils.isNativeJavaType(new int[]{}.getClass())); System.out.println(new Integer[]{}.getClass().getName()); }