(Class<T> type, Object arg)
| 246 | } |
| 247 | |
| 248 | private static <T> T expectArgument(Class<T> type, Object arg) { |
| 249 | try { |
| 250 | return type.cast(arg); |
| 251 | } catch (ClassCastException e) { |
| 252 | throw new IllegalArgumentException(arg + " is not a " + type.getSimpleName()); |
| 253 | } |
| 254 | } |
| 255 | |
| 256 | /** A TypeTable maintains mapping from {@link TypeVariable} to types. */ |
| 257 |
no test coverage detected