Class CollectionAnalysis


  • public final class CollectionAnalysis
    extends java.lang.Object
    Utility class for analyzing collections.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private CollectionAnalysis()
      Private constructor to prevent instantiation, because it is a utility class.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static boolean isSynchronizedCollection​(ClassMember classMember)
      Check if a class member is a synchronized collection.
      static boolean isSynchronizedCollection​(java.lang.String className, java.lang.String methodName)
      Checks if a method is a synchronized collection creating one.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CollectionAnalysis

        private CollectionAnalysis()
        Private constructor to prevent instantiation, because it is a utility class.
    • Method Detail

      • isSynchronizedCollection

        public static boolean isSynchronizedCollection​(ClassMember classMember)
        Check if a class member is a synchronized collection.
        Parameters:
        classMember - the class member
        Returns:
        true if the class member is a synchronized collection, false otherwise
      • isSynchronizedCollection

        public static boolean isSynchronizedCollection​(@DottedClassName
                                                       java.lang.String className,
                                                       java.lang.String methodName)
        Checks if a method is a synchronized collection creating one.
        Parameters:
        className - name of the class containing the method
        methodName - the name of the method
        Returns:
        true if it's a synchronized collection creating method, false otherwise