methodIsValid method

bool methodIsValid(
  1. String method
)

Whether method is one this revision accepts.

Walks back from this revision to the first one, so a method holds until some later revision lists it in removedMethods. A method no revision ever added is not part of any of them.

Implementation

bool methodIsValid(String method) {
  for (var version = this; ; version = values[version.index - 1]) {
    if (version.removedMethods.contains(method)) return false;
    if (version.addedMethods.contains(method)) return true;
    if (version.index == 0) return false;
  }
}