code: public static JavacTrees instance(ProcessingEnvironment env) {
          if (!(env instanceof JavacProcessingEnvironment))
              throw new IllegalArgumentException();
          return instance(((JavacProcessingEnvironment)env).getContext());
      }
docs: called reflectively from Trees.instance(ProcessingEnvironment env)