Class ClassPatternsUtils
java.lang.Object
org.sonar.java.checks.helpers.ClassPatternsUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic booleanisPrivateInnerClass(ClassTree classTree) static booleanisUtilityClass(ClassTree classTree, JavaVersion javaVersion) True if the class contains only static members (with caveats).static booleanshouldBePublicClass(ClassTree classTree, List<MethodTree> methods) Returns true if the class has any public static method or public static field that requires the class itself to be public (e.g. constants or factory methods used from outside).
-
Method Details
-
shouldBePublicClass
Returns true if the class has any public static method or public static field that requires the class itself to be public (e.g. constants or factory methods used from outside). -
isPrivateInnerClass
-
isUtilityClass
True if the class contains only static members (with caveats).
-