Class CodeUnit

  • All Implemented Interfaces:
    CodeElement

    public class CodeUnit
    extends ProgramUnit
    A file-based unit of the program to analyze, that logically groups code in files or modules.
    • Constructor Detail

      • CodeUnit

        public CodeUnit​(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

      • canBeInstantiated

        public boolean canBeInstantiated()
        Description copied from class: Unit
        Yields true if this unit can be instantiated, false otherwise (e.g., interfaces, abstract classes).
        Specified by:
        canBeInstantiated in class Unit
        Returns:
        true if this unit can be instantiated, false otherwise