@SuppressWarnings("unchecked") // guarded by an equals check
  private <T> Local<T> coerce(Local<?> local, TypeId<T> expectedType) {
    if (!local.type.equals(expectedType)) {
      throw new IllegalArgumentException("requested " + expectedType + " but was " + local.type);
    }
    return (Local<T>) local;
  }
Returns the local for {@code this} of type {@code type}. It is an error to call {@code
getThis()} if this is a static method.
android/android_framework/dex-maker/src/main/java/com/android/dx/Code.java