public static Class<?> invocationHandlerReturnType(Class<?> type){
  if (type == byte.class)   return Byte.class;
  if (type == char.class)   return Character.class;
  if (type == double.class)   return Double.class;
  if (type == float.class)   return Float.class;
  if (type == int.class)   return Integer.class;
  if (type == long.class)   return Long.class;
  if (type == short.class)   return Short.class;
  if (type == boolean.class)   return Boolean.class;
  return type;
}

public static Class < ? > invocationHandlerReturnType ( Class < ? > type ) { if ( type == byte . class ) return Byte . class ; if ( type == char . class ) return Character . class ; if ( type == double . class ) return Double . class ; if ( type == float . class ) return Float . class ; if ( type == int . class ) return Integer . class ; if ( type == long . class ) return Long . class ; if ( type == short . class ) return Short . class ; if ( type == boolean . class ) return Boolean . class ; return type ; }
returns the type that must be returned by the invocation handler of a dynamic proxy in order to have the dynamic proxy return the specified type ( which is assumed to be a legal member type for an annotation ) .
