Class StaticImports
java.lang.Object
com.google.errorprone.bugpatterns.StaticImports
public final class StaticImports extends Object
Logic for inspecting static imports used by
NonCanonicalStaticImport
, NonCanonicalStaticMemberImport
, and UnnecessaryStaticImport
.-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StaticImports.StaticImportInfo
Information about a static import. -
Method Summary
Modifier and Type Method Description static StaticImports.StaticImportInfo
tryCreate(com.sun.source.tree.ImportTree tree, VisitorState state)
Returns aStaticImports.StaticImportInfo
if the given import is a static single-type import.static StaticImports.StaticImportInfo
tryCreate(com.sun.source.tree.MemberSelectTree access, VisitorState state)
-
Method Details
-
tryCreate
@Nullable public static StaticImports.StaticImportInfo tryCreate(com.sun.source.tree.ImportTree tree, VisitorState state)Returns aStaticImports.StaticImportInfo
if the given import is a static single-type import. Returnsnull
otherwise, e.g. because the import is non-static, or an on-demand import, or statically imports a field or method. -
tryCreate
@Nullable public static StaticImports.StaticImportInfo tryCreate(com.sun.source.tree.MemberSelectTree access, VisitorState state)
-