public class Javac
extends java.lang.Object
JavacUtils
.| 构造器和说明 |
|---|
Javac(com.sun.tools.javac.tree.TreeMaker maker,
com.sun.tools.javac.api.JavacTrees trees,
com.sun.tools.javac.util.Names names,
Logger logger)
Instantiates a new javac.
|
| 限定符和类型 | 方法和说明 |
|---|---|
void |
addImportInfo(javax.lang.model.element.Element element,
java.lang.Class<?> importType)
Adds the import info.
|
<E extends java.lang.RuntimeException> |
eqNull(com.sun.tools.javac.tree.JCTree.JCVariableDecl jcVariableDecl)
Eq null.
|
java.lang.String |
getImportClassName(java.lang.String className,
javax.lang.model.element.Element element) |
java.util.Collection<com.sun.tools.javac.tree.JCTree.JCImport> |
getImportInfos(javax.lang.model.element.Element element) |
com.sun.tools.javac.tree.JCTree.JCMethodDecl |
getterMethod(com.sun.tools.javac.tree.JCTree.JCVariableDecl jcVariableDecl)
Gets the ter method.
|
com.sun.tools.javac.tree.JCTree.JCMethodDecl |
setterMethod(com.sun.tools.javac.tree.JCTree.JCVariableDecl jcVariableDecl)
Make setter method.
|
<E extends java.lang.RuntimeException> |
throwException(java.lang.Class<E> exceptionType,
java.lang.String exceptionMessage)
Throw exception.
|
public Javac(com.sun.tools.javac.tree.TreeMaker maker,
com.sun.tools.javac.api.JavacTrees trees,
com.sun.tools.javac.util.Names names,
Logger logger)
maker - the makertrees - the treesnames - the nameslogger - the loggerpublic <E extends java.lang.RuntimeException> com.sun.tools.javac.tree.JCTree.JCThrow throwException(java.lang.Class<E> exceptionType,
java.lang.String exceptionMessage)
E - the element typeexceptionType - the exception typeexceptionMessage - the exception messagepublic <E extends java.lang.RuntimeException> com.sun.tools.javac.tree.JCTree.JCBinary eqNull(com.sun.tools.javac.tree.JCTree.JCVariableDecl jcVariableDecl)
E - the element typejcVariableDecl - the jc variable declpublic java.lang.String getImportClassName(java.lang.String className,
javax.lang.model.element.Element element)
public java.util.Collection<com.sun.tools.javac.tree.JCTree.JCImport> getImportInfos(javax.lang.model.element.Element element)
public void addImportInfo(javax.lang.model.element.Element element,
java.lang.Class<?> importType)
element - the elementimportType - the import typepublic com.sun.tools.javac.tree.JCTree.JCMethodDecl getterMethod(com.sun.tools.javac.tree.JCTree.JCVariableDecl jcVariableDecl)
jcVariableDecl - the jc variable declpublic com.sun.tools.javac.tree.JCTree.JCMethodDecl setterMethod(com.sun.tools.javac.tree.JCTree.JCVariableDecl jcVariableDecl)
jcVariableDecl - the jc variable decl