Class StaticImports
java.lang.Object
com.google.errorprone.bugpatterns.StaticImports
Logic for inspecting static imports used by
NonCanonicalStaticImport, NonCanonicalStaticMemberImport, and UnnecessaryStaticImport.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classInformation about a static import. -
Method Summary
Modifier and TypeMethodDescriptionstatic @Nullable StaticImports.StaticImportInfotryCreate(ImportTree tree, VisitorState state) Returns aStaticImports.StaticImportInfoif the given import is a static single-type import.static @Nullable StaticImports.StaticImportInfotryCreate(MemberSelectTree access, VisitorState state)
-
Method Details
-
tryCreate
public static @Nullable StaticImports.StaticImportInfo tryCreate(ImportTree tree, VisitorState state) Returns aStaticImports.StaticImportInfoif the given import is a static single-type import. Returnsnullotherwise, 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(MemberSelectTree access, VisitorState state)
-