MCPcopy Create free account
hub / github.com/Whiley/WhileyCompiler / lookup

Method lookup

src/main/java/wyil/lang/WyilFile.java:1489–1498  ·  view source on GitHub ↗
(WyilFile.Type type)

Source from the content-addressed store, hash-verified

1487 }
1488
1489 public T lookup(WyilFile.Type type) {
1490 for (int i = 1; i != operands.length; ++i) {
1491 Ref<T> candidate = (Ref<T>) operands[i];
1492 Decl.Named<?> n = candidate.get();
1493 if(n.getType().equals(type)) {
1494 return (T) n;
1495 }
1496 }
1497 throw new IllegalArgumentException("unable to find candidate declaration");
1498 }
1499
1500 @SuppressWarnings("unchecked")
1501 public void resolve(T... items) {

Callers 2

typeInvokeExpressionMethod · 0.45
typeLambdaAccessMethod · 0.45

Calls 3

getMethod · 0.65
getTypeMethod · 0.65
equalsMethod · 0.45

Tested by

no test coverage detected