public class JavacImportList extends Object implements ImportList
| Constructor and Description |
|---|
JavacImportList(com.sun.tools.javac.tree.JCTree.JCCompilationUnit cud) |
| Modifier and Type | Method and Description |
|---|---|
Collection<String> |
applyNameToStarImports(String startsWith,
String name)
Takes all explicit non-static star imports whose first element is equal to
startsWith, replaces the star with unqualified, and returns these. |
String |
applyUnqualifiedNameToPackage(String unqualified) |
String |
getFullyQualifiedNameForSimpleName(String unqualified)
If there is an explicit import of the stated unqualified type name, return that.
|
boolean |
hasStarImport(String packageName)
Returns true if the package name is explicitly star-imported, OR the packageName refers to this source file's own package name, OR packageName is 'java.lang'.
|
public JavacImportList(com.sun.tools.javac.tree.JCTree.JCCompilationUnit cud)
public String getFullyQualifiedNameForSimpleName(String unqualified)
ImportListgetFullyQualifiedNameForSimpleName in interface ImportListpublic boolean hasStarImport(String packageName)
ImportListhasStarImport in interface ImportListpublic Collection<String> applyNameToStarImports(String startsWith, String name)
ImportListstartsWith, replaces the star with unqualified, and returns these.applyNameToStarImports in interface ImportListpublic String applyUnqualifiedNameToPackage(String unqualified)
applyUnqualifiedNameToPackage in interface ImportListCopyright © 2009-2015 The Project Lombok Authors, licensed under the MIT licence.