Exemplo n.º 1
0
  private static CallSite getCallSiteFor(CallType callType, MethAddr methAddr) {
    assert callType != null : "Calltype should never be null";

    String name = methAddr.getName();

    switch (callType) {
      case NORMAL:
        return MethodIndex.getCallSite(name);
      case FUNCTIONAL:
        return MethodIndex.getFunctionalCallSite(name);
      case VARIABLE:
        return MethodIndex.getVariableCallSite(name);
      case SUPER:
        return MethodIndex.getSuperCallSite();
      case UNKNOWN:
    }

    return null; // fallthrough for unknown
  }