Class Statement

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected int offset
      The offset of the statement within the cfg.
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected Statement​(CFG cfg, CodeLocation location)
      Builds a statement happening at the given source location.
    • Field Detail

      • offset

        protected int offset
        The offset of the statement within the cfg.
    • Constructor Detail

      • Statement

        protected Statement​(CFG cfg,
                            CodeLocation location)
        Builds a statement happening at the given source location.
        Parameters:
        cfg - the cfg that this statement belongs to
        location - the location where this statement is defined within the source file. If unknown, use null
    • Method Detail

      • getCFG

        public final CFG getCFG()
        Description copied from interface: ProgramPoint
        Yields the CFG that this program point belongs to.
        Specified by:
        getCFG in interface ProgramPoint
        Returns:
        the containing cfg
      • getOffset

        public final int getOffset()
        Yields the offset of this statement relative to its containing cfg.
        Returns:
        the offset
      • stopsExecution

        public boolean stopsExecution()
        Whether or not this statement stops the execution of the containing cfg, either by throwing an error or returning a value. To distinguish error-raising halting statements and normal ones, use throwsError().
        Returns:
        true only if that condition holds
      • throwsError

        public boolean throwsError()
        Whether or not this statement throws an error, halting the normal execution of the containing cfg.
        Returns:
        true only if that condition holds
      • 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
      • toString

        public abstract java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getLocation

        public CodeLocation getLocation()
        Description copied from interface: CodeElement
        Yields the location where this code element appears in the source file.
        Specified by:
        getLocation in interface CodeElement
        Returns:
        the location where this code element apperars in the source file
      • compareTo

        public int compareTo​(Statement o)
        Specified by:
        compareTo in interface java.lang.Comparable<Statement>