Class MutableClasses

java.lang.Object
edu.umd.cs.findbugs.util.MutableClasses

public class MutableClasses extends Object
  • Field Details

    • KNOWN_IMMUTABLE_CLASSES

      private static final Set<String> KNOWN_IMMUTABLE_CLASSES
    • KNOWN_IMMUTABLE_PACKAGES

      private static final Set<String> KNOWN_IMMUTABLE_PACKAGES
    • CONSTRUCTOR_LIKE_NAMES

      private static final Set<String> CONSTRUCTOR_LIKE_NAMES
    • SETTER_LIKE_PREFIXES

      private static final List<String> SETTER_LIKE_PREFIXES
  • Constructor Details

    • MutableClasses

      public MutableClasses()
  • Method Details

    • mutableSignature

      public static boolean mutableSignature(String sig)
    • isConstructorLikeMethod

      public static boolean isConstructorLikeMethod(String methodName)
      Check if the method name looks like a constructor
      Parameters:
      methodName - the method name
      Returns:
      true if the method name looks like a constructor
    • looksLikeASetter

      public static boolean looksLikeASetter(String methodName, String classSig, String retSig)
      Check if the method name looks like a setter
      Parameters:
      methodName - the method name
      classSig - the class signature
      retSig - the return type signature
      Returns:
      true if the method name looks like a setter
    • looksLikeASetter

      public static boolean looksLikeASetter(String methodName)
      Check if the method name looks like a setter
      Parameters:
      methodName - the method name
      Returns:
      true if the method name looks like a setter