Class StaticImports
java.lang.Object
com.google.errorprone.bugpatterns.StaticImports
Logic for inspecting static imports used by
NonCanonicalStaticImport
, NonCanonicalStaticMemberImport
, and UnnecessaryStaticImport
.-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
Information about a static import. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable 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 @Nullable StaticImports.StaticImportInfo
tryCreate
(com.sun.source.tree.MemberSelectTree access, VisitorState state)
-
Method Details
-
tryCreate
public static @Nullable 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
public static @Nullable StaticImports.StaticImportInfo tryCreate(com.sun.source.tree.MemberSelectTree access, VisitorState state)
-