public static boolean isJdkImmutable ( Class < ? > type ) { if ( Class . class == type ) { return true ; } if ( String . class == type ) { return true ; } if ( BigInteger . class == type ) { return true ; } if ( BigDecimal . class == type ) { return true ; } if ( URL . class == type ) { return true ; } if ( UUID . class == type ) { return true ; } if ( URI . class == type ) { return true ; } if ( Pattern . class == type ) { return true ; } return false ; }
Indicate if the class is a known non - primitive JDK immutable type