public class InternalUtils
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static int |
compareDiagnosticPosition(Tree tree1,
Tree tree2)
Compares tree1 to tree2 by the position at which a diagnostic (e.g., an error message) for
the tree should be printed.
|
static java.lang.ClassLoader |
getClassLoaderForClass(java.lang.Class<? extends java.lang.Object> clazz)
Obtain the class loader for
clazz . |
static com.sun.tools.javac.util.Context |
getJavacContext(javax.annotation.processing.ProcessingEnvironment env)
Helper function to extract the javac Context from the javac processing environment.
|
public static com.sun.tools.javac.util.Context getJavacContext(javax.annotation.processing.ProcessingEnvironment env)
env
- the processing environmentpublic static java.lang.ClassLoader getClassLoaderForClass(java.lang.Class<? extends java.lang.Object> clazz)
clazz
. If that is not available, return the system class
loader.clazz
- the class whose class loader to findclazz
, or the system class loader, or null if both
are unavailable