Package it.unive.lisa.program
Class AbstractClassUnit
- java.lang.Object
-
- it.unive.lisa.program.Unit
-
- it.unive.lisa.program.ProgramUnit
-
- it.unive.lisa.program.CompilationUnit
-
- it.unive.lisa.program.ClassUnit
-
- it.unive.lisa.program.AbstractClassUnit
-
- All Implemented Interfaces:
CodeElement
public class AbstractClassUnit extends ClassUnit
A compilation unit of the program to analyze. A compilation unit is aUnitthat also defines instance members, that can be inherited by subunits.
-
-
Field Summary
-
Fields inherited from class it.unive.lisa.program.CompilationUnit
instances
-
-
Constructor Summary
Constructors Constructor Description AbstractClassUnit(CodeLocation location, Program program, java.lang.String name, boolean sealed)Builds a concrete compilation unit, defined at the given program point.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanBeInstantiated()Yieldstrueif this unit can be instantiated,falseotherwise (e.g., interfaces, abstract classes).-
Methods inherited from class it.unive.lisa.program.ClassUnit
addAncestor, addInstance, addInterface, addSuperclass, getImmediateAncestors, getInterfaces, getSuperclasses, isInstanceOf
-
Methods inherited from class it.unive.lisa.program.CompilationUnit
addAnnotation, addInstanceCodeMember, addInstanceGlobal, getAbstractCodeMembers, getAnnotations, getCodeMembersRecursively, getGlobalsRecursively, getInstanceCFGs, getInstanceCodeMember, getInstanceCodeMembers, getInstanceCodeMembersByName, getInstanceConstructs, getInstanceGlobal, getInstanceGlobals, getInstances, getMatchingInstanceCodeMembers, isSealed, searchCodeMembers, searchGlobals
-
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, getGlobal, getGlobals, getMatchingCodeMember, getName, toString
-
-
-
-
Constructor Detail
-
AbstractClassUnit
public AbstractClassUnit(CodeLocation location, Program program, java.lang.String name, boolean sealed)
Builds a concrete compilation unit, defined at the given program point.- Parameters:
location- the location where the unit is define within the source fileprogram- the program where this unit is definedname- the name of the unitsealed- whether or not this unit is sealed, meaning that it cannot be used as super unit of other compilation units
-
-
Method Detail
-
canBeInstantiated
public boolean canBeInstantiated()
Description copied from class:UnitYieldstrueif this unit can be instantiated,falseotherwise (e.g., interfaces, abstract classes).- Overrides:
canBeInstantiatedin classClassUnit- Returns:
trueif this unit can be instantiated,falseotherwise
-
-