Interface Realm<T>

All Known Implementing Classes:
MainSources, TestPreview, TestSources

public interface Realm<T>
A collection of modular source units.
  • Method Summary

    Modifier and Type Method Description
    String name()
    Return the name of the realm.
    default JavaRelease release()
    Return the desired Java release of the realm.
    SourceUnitMap units()
    Return the underlying map of modular source units.
    T units​(SourceUnitMap units)
    Create a new copy instance with setting the given modular source units map.
    default T with​(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

      default JavaRelease release()
      Return the desired Java release of the realm.
      Returns:
      A JavaRelease instance
    • units

      SourceUnitMap units()
      Return the underlying map of modular source units.
      Returns:
      A SourceUnitMap instance
    • units

      T units​(SourceUnitMap 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

      default T with​(SourceUnit... moreUnits)
      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