Package it.unive.lisa.program
Class CodeUnit
- java.lang.Object
-
- it.unive.lisa.program.Unit
-
- it.unive.lisa.program.ProgramUnit
-
- it.unive.lisa.program.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 Summary
Constructors Constructor Description CodeUnit(CodeLocation location, Program program, java.lang.String name)
Builds a unit, defined at the given location.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
canBeInstantiated()
Yieldstrue
if this unit can be instantiated,false
otherwise (e.g., interfaces, abstract classes).-
Methods inherited from class it.unive.lisa.program.ProgramUnit
getLocation, getProgram
-
Methods inherited from class it.unive.lisa.program.Unit
addCodeMember, addGlobal, getCodeMember, getCodeMembers, getCodeMembersByName, getCodeMembersRecursively, getGlobal, getGlobals, getGlobalsRecursively, getMatchingCodeMember, getName, toString
-
-
-
-
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 fileprogram
- the program where this unit is definedname
- the name of the unit
-
-
Method Detail
-
canBeInstantiated
public boolean canBeInstantiated()
Description copied from class:Unit
Yieldstrue
if this unit can be instantiated,false
otherwise (e.g., interfaces, abstract classes).- Specified by:
canBeInstantiated
in classUnit
- Returns:
true
if this unit can be instantiated,false
otherwise
-
-