code: public static DocTrees instance(ProcessingEnvironment env) {
          if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment"))
              throw new IllegalArgumentException();
          return (DocTrees) getJavacTrees(ProcessingEnvironment.class, env);
      }
docs: Returns a DocTrees object for a given ProcessingEnvironment.
  @param env the processing environment for which to get the Trees object
  @return the DocTrees object
  @throws IllegalArgumentException if the env does not support the Trees API.