- All Known Implementing Classes:
MainSources,TestPreview,TestSources
public interface Realm<T>
A collection of modular source units.
-
Method Summary
Modifier and Type Method Description Stringname()Return the name of the realm.default JavaReleaserelease()Return the desired Java release of the realm.SourceUnitMapunits()Return the underlying map of modular source units.Tunits(SourceUnitMap units)Create a new copy instance with setting the given modular source units map.default Twith(SourceUnit... moreUnits)Create a new copy instance with the given modular source units added.
-
Method Details
-
name
String name()Return the name of the realm.- Returns:
- An empty string for the main realm, else a non-empty name string
-
release
Return the desired Java release of the realm.- Returns:
- A
JavaReleaseinstance
-
units
SourceUnitMap units()Return the underlying map of modular source units.- Returns:
- A
SourceUnitMapinstance
-
units
Create a new copy instance with setting the given modular source units map.- Parameters:
units- The modular source unit map to set- Returns:
- A new copy instance
-
with
Create a new copy instance with the given modular source units added.- Parameters:
moreUnits- Zero or more modular source units to added to the new instance- Returns:
- A new copy instance
-