Class StaticImports
- java.lang.Object
-
- com.google.errorprone.bugpatterns.StaticImports
-
public final class StaticImports extends Object
Logic for inspecting static imports used byNonCanonicalStaticImport
,NonCanonicalStaticMemberImport
, andUnnecessaryStaticImport
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
StaticImports.StaticImportInfo
Information about a static import.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static StaticImports.StaticImportInfo
tryCreate(ImportTree tree, VisitorState state)
Returns aStaticImports.StaticImportInfo
if the given import is a static single-type import.static StaticImports.StaticImportInfo
tryCreate(MemberSelectTree access, VisitorState state)
-
-
-
Method Detail
-
tryCreate
@Nullable public static StaticImports.StaticImportInfo tryCreate(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(MemberSelectTree access, VisitorState state)
-
-