public boolean shouldOptimize(String canonicalMethodName) {
    // Optimize only what's in the optimize list.
    if (optimizeList != null) {
      return optimizeList.contains(canonicalMethodName);
    }

    /*
     * Or don't optimize what's listed here. (The two lists are
     * mutually exclusive.
     */

    if (dontOptimizeList != null) {
      return !dontOptimizeList.contains(canonicalMethodName);
    }

    // If neither list has been specified, then optimize everything.
    return true;
  }
Checks whether the specified method should be optimized

@param canonicalMethodName name of method being considered
@return true if it should be optimized
android/android_framework/dex-maker/src/main/java/com/android/dx/dex/cf/OptimizerOptions.java