Class FrameSeparator


  • public class FrameSeparator
    extends java.lang.Object
    Helper class used to compare stacktrace frames when grouping them into different branches in the stacktrace model.

    There are two dimensions to consider when comparing frames. The first is the level of detail in a frame, where package is the most general and byte code index is the most specific. The second is if different optimization levels (see IMCFrame.Type) should be treated as equal or not.

    • Constructor Detail

      • FrameSeparator

        public FrameSeparator​(FrameSeparator.FrameCategorization categorization,
                              boolean distinguishFramesByOptimization)
        Parameters:
        categorization - How much detail to look at when comparing frames.
        distinguishFramesByOptimization - True to treat different compiled versions of the code as different.
    • Method Detail

      • isDistinguishFramesByOptimization

        public boolean isDistinguishFramesByOptimization()
      • isSeparate

        public boolean isSeparate​(IMCFrame frameA,
                                  IMCFrame frameB)
        Check if two frames are different according to this frame separator.
      • getCategory

        java.lang.Object getCategory​(IMCFrame frame)
        Get an object identifying a frame on the most significant level used by this frame separator. This can be a package name or a type or method object. The result should only be used for equality checks.
      • compareDetails

        boolean compareDetails​(IMCFrame frameA,
                               IMCFrame frameB)
        Check if two frames are equal according to this frame separator.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object