Class Units::Unit

A block of code larger than a statement

Direct supertypes

Indirect supertypes

Known direct subtypes

Predicates

getMetrics

Get the metrics for this unit

getProgramDefinition

Get the program definition containing this unit. If the unit is a program definition, return the unit itself.

toString

Inherited predicates

getASuccessor

Get any possible successor in the progam’s control flow.

from AstNode
getEnclosingText

Get the unit containing this element.

from AstNode
getEnclosingUnit

Get the unit containing this element.

from AstNode
getHeader

Get the header of this Unit.

from Unit_
getLocation

Get this element’s location.

from Locatable
getNumLines

Get the number of lines covered by this element.

from Locatable
getParentfrom Unit_
hasAncestor

Does this AstNode have ‘other’ as a ancestor?

from AstNode
hasDescendant

Does this AstNode have ‘other’ as a descendant?

from AstNode