Class LineImpl

    • Field Detail

      • SINGLETON_INS_LIMIT

        private static final int SINGLETON_INS_LIMIT
        Max instruction counter value for which singletons are created
        See Also:
        Constant Field Values
      • SINGLETON_BRA_LIMIT

        private static final int SINGLETON_BRA_LIMIT
        Max branch counter value for which singletons are created
        See Also:
        Constant Field Values
      • SINGLETONS

        private static final LineImpl[][][][] SINGLETONS
      • EMPTY

        public static final LineImpl EMPTY
        Empty line without instructions or branches.
      • instructions

        protected CounterImpl instructions
        instruction counter
      • branches

        protected CounterImpl branches
        branch counter
    • Method Detail

      • increment

        public abstract LineImpl increment​(ICounter instructions,
                                           ICounter branches)
        Adds the given counters to this line.
        Parameters:
        instructions - instructions to add
        branches - branches to add
        Returns:
        instance with new counter values
      • getInstructionCounter

        public ICounter getInstructionCounter()
        Description copied from interface: ILine
        Returns the instruction counter for this line.
        Specified by:
        getInstructionCounter in interface ILine
        Returns:
        instruction counter
      • getBranchCounter

        public ICounter getBranchCounter()
        Description copied from interface: ILine
        Returns the branches counter for this line.
        Specified by:
        getBranchCounter in interface ILine
        Returns:
        branches counter
      • 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