/** * Gets a Trees object for a given CompilationTask. * @throws IllegalArgumentException if the env does not support the Trees API. */ public static Trees instance(ProcessingEnvironment env) { if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment")) throw new IllegalArgumentException(); return getJavacTrees(ProcessingEnvironment.class, env); }
/** * Gets a Trees object for a given CompilationTask. * @throws IllegalArgumentException if the task does not support the Trees API. */ public static Trees instance(CompilationTask task) { if (!task.getClass().getName().equals("com.sun.tools.javac.api.JavacTaskImpl")) throw new IllegalArgumentException(); return getJavacTrees(CompilationTask.class, task); }
/** * Gets a Trees object for a given ProcessingEnvironment. * @param env the processing environment for which to get the Trees object * @throws IllegalArgumentException if the env does not support the Trees API. */ public static Trees instance(ProcessingEnvironment env) { if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment")) throw new IllegalArgumentException(); return getJavacTrees(ProcessingEnvironment.class, env); }
/** * Gets a Trees object for a given CompilationTask. * @throws IllegalArgumentException if the env does not support the Trees API. */ public static Trees instance(ProcessingEnvironment env) { if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment")) throw new IllegalArgumentException(); return getJavacTrees(ProcessingEnvironment.class, env); }
/** * Gets a Trees object for a given CompilationTask. * @throws IllegalArgumentException if the task does not support the Trees API. */ public static Trees instance(CompilationTask task) { if (!task.getClass().getName().equals("com.sun.tools.javac.api.JavacTaskImpl")) throw new IllegalArgumentException(); return getJavacTrees(CompilationTask.class, task); }
/** * Gets a Trees object for a given CompilationTask. * @param task the compilation task for which to get the Trees object * @throws IllegalArgumentException if the task does not support the Trees API. */ public static Trees instance(CompilationTask task) { String taskClassName = task.getClass().getName(); if (!taskClassName.equals("com.sun.tools.javac.api.JavacTaskImpl") && !taskClassName.equals("com.sun.tools.javac.api.BasicJavacTask")) throw new IllegalArgumentException(); return getJavacTrees(CompilationTask.class, task); }
/** * Gets a Trees object for a given ProcessingEnvironment. * @param env the processing environment for which to get the Trees object * @throws IllegalArgumentException if the env does not support the Trees API. */ public static Trees instance(ProcessingEnvironment env) { if (!env.getClass().getName().equals("com.sun.tools.javac.processing.JavacProcessingEnvironment")) throw new IllegalArgumentException(); return getJavacTrees(ProcessingEnvironment.class, env); }
/** * Gets a Trees object for a given CompilationTask. * @param task the compilation task for which to get the Trees object * @throws IllegalArgumentException if the task does not support the Trees API. */ public static Trees instance(CompilationTask task) { String taskClassName = task.getClass().getName(); if (!taskClassName.equals("com.sun.tools.javac.api.JavacTaskImpl") && !taskClassName.equals("com.sun.tools.javac.api.BasicJavacTask")) throw new IllegalArgumentException(); return getJavacTrees(CompilationTask.class, task); }