Enum Class StackTraceCleaner.StackFrameType

java.lang.Object
java.lang.Enum<StackTraceCleaner.StackFrameType>
com.google.common.truth.StackTraceCleaner.StackFrameType
All Implemented Interfaces:
Serializable, Comparable<StackTraceCleaner.StackFrameType>, Constable
Enclosing class:
StackTraceCleaner

private static enum StackTraceCleaner.StackFrameType extends Enum<StackTraceCleaner.StackFrameType>
Enum of the package or class-name based categories of stack frames that might be removed or collapsed by the cleaner.
  • Enum Constant Details

  • Field Details

    • name

      private final String name
    • prefixes

      private final com.google.common.collect.ImmutableList<String> prefixes
  • Constructor Details

    • StackFrameType

      private StackFrameType(String name, String... prefixes)
      Each type of stack frame has a name of the summary displayed in the cleaned trace.

      Most also have a set of fully qualified class name prefixes that identify when a frame belongs to this type.

  • Method Details

    • values

      public static StackTraceCleaner.StackFrameType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static StackTraceCleaner.StackFrameType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • forClassName

      private static StackTraceCleaner.StackFrameType forClassName(String fullyQualifiedClassName)
      Helper method to determine the frame type from the fully qualified class name.
    • getName

      String getName()
      Returns the name of this frame type to display in the cleaned trace
    • belongsToType

      boolean belongsToType(String fullyQualifiedClassName)
      Returns true if the given frame belongs to this frame type based on the package and/or class name of the frame.