MCPcopy Create free account
hub / github.com/antlr/codebuff / expectArgument

Method expectArgument

output/java_guava/1.4.17/TypeResolver.java:248–254  ·  view source on GitHub ↗
(Class<T> type, Object arg)

Source from the content-addressed store, hash-verified

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

Callers 1

Calls 2

castMethod · 0.45
getSimpleNameMethod · 0.45

Tested by

no test coverage detected