NativeTypes { public static boolean isNumber(Class<?> clazz) { if ( clazz == null ) { return false; } else { return NUMBER_TYPES.contains( clazz ); } } private  NativeTypes(); static Class<?> getWrapperType(Class<?> clazz); static Class<?> getPrimitiveType(Class<?> clazz); static boolean isNative(String fullyQualifiedName); static boolean isNumber(Class<?> clazz); static Class<?> getLiteral(String className, String literal); static String getName(TypeKind typeKind); static boolean isNarrowing( String sourceFQN, String targetFQN );  }
@Test public void testIsNumber() { assertFalse( NativeTypes.isNumber( null ) ); assertFalse( NativeTypes.isNumber( Object.class ) ); assertFalse( NativeTypes.isNumber( String.class ) ); assertTrue( NativeTypes.isNumber( double.class ) ); assertTrue( NativeTypes.isNumber( Double.class ) ); assertTrue( NativeTypes.isNumber( long.class ) ); assertTrue( NativeTypes.isNumber( Long.class ) ); assertTrue( NativeTypes.isNumber( BigDecimal.class ) ); assertTrue( NativeTypes.isNumber( BigInteger.class ) ); }