static Class<?> canonicalize(Class<?> t,int how){
  Class<?> ct;
  if (t == Object.class) {
  }
 else   if (!t.isPrimitive()) {
switch (how) {
case UNWRAP:
      ct=Wrapper.asPrimitiveType(t);
    if (ct != t)     return ct;
  break;
case RAW_RETURN:
case ERASE:
return Object.class;
}
}
 else if (t == void.class) {
switch (how) {
case RAW_RETURN:
return int.class;
case WRAP:
return Void.class;
}
}
 else {
switch (how) {
case WRAP:
return Wrapper.asWrapperType(t);
case INTS:
if (t == int.class || t == long.class) return null;
if (t == double.class) return long.class;
return int.class;
case LONGS:
if (t == long.class) return null;
return long.class;
case RAW_RETURN:
if (t == int.class || t == long.class || t == float.class || t == double.class) return null;
return int.class;
}
}
return null;
}

static Class < ? > canonicalize ( Class < ? > t , int how ) { Class < ? > ct ; if ( t == Object . class ) { } else if ( ! t . isPrimitive ( ) ) { switch ( how ) { case UNWRAP : ct = Wrapper . asPrimitiveType ( t ) ; if ( ct != t ) return ct ; break ; case RAW_RETURN : case ERASE : return Object . class ; } } else if ( t == void . class ) { switch ( how ) { case RAW_RETURN : return int . class ; case WRAP : return Void . class ; } } else { switch ( how ) { case WRAP : return Wrapper . asWrapperType ( t ) ; case INTS : if ( t == int . class || t == long . class ) return null ; if ( t == double . class ) return long . class ; return int . class ; case LONGS : if ( t == long . class ) return null ; return long . class ; case RAW_RETURN : if ( t == int . class || t == long . class || t == float . class || t == double . class ) return null ; return int . class ; } } return null ; }
canonicalize the given return or param type . return null if the type is already canonicalized .
