Class ProgramUnit

    • Constructor Detail

      • ProgramUnit

        public ProgramUnit​(CodeLocation location,
                           Program program,
                           java.lang.String name)
        Builds a unit, defined at the given location.
        Parameters:
        location - the location where the unit is define within the source file
        program - the program where this unit is defined
        name - the name of the unit
    • Method Detail

      • getLocation

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

        public Program getProgram()
        Description copied from class: Unit
        Yields the Program where this unit is defined.
        Specified by:
        getProgram in class Unit
        Returns:
        the program