IUnit

public interface IUnit

Results of operations on a single source file. Extensible through unit contributions.

Methods

detached

boolean detached()
Returns:True if the unit is detached, i.e. the source is unknown. False otherwise.

source

FileObject source()
Returns:Source file that operations were executed on, or null if the source file is unknown. The source file can be unknown when executing operations on a string of text in memory for example. When the source is unknown, this unit is detached.

unitContrib

IUnitContrib unitContrib(String id)

Returns a unit contribution with given identifier.

Parameters:
  • id – Unit contribution identifier.
Returns:

Unit contribution with given identifier, or null if it does not exist.

unitContribs

Iterable<IUnitContrib> unitContribs()
Returns:All unit contributions.