IFacetContributions

public interface IFacetContributions

Interface representing language facet contributions. Facets are retrieved by type, multiple facets of the same type are allowed. Clients determine how multiple facets of the same type are handled.

Methods

facet

<T extends IFacet> T facet(Class<T> type)

Returns a facet of given type.

Parameters:
  • type – Facet type.
Throws:
Returns:

Facet of given type, or null if there is no facet of given type.

facetContribution

<T extends IFacet> FacetContribution<T> facetContribution(Class<T> type)

Returns a facet contribution of given type.

Parameters:
  • type – Facet type.
Throws:
Returns:

Facet contribution of given type.

facetContributions

<T extends IFacet> Iterable<FacetContribution<T>> facetContributions(Class<T> type)

Returns facet contributions of given type.

Parameters:
  • type – Facet type
Returns:

Facet contributions of given type.

facetContributions

Iterable<FacetContribution<IFacet>> facetContributions()
Returns:All facet contributions.

facets

<T extends IFacet> Iterable<T> facets(Class<T> type)

Returns facets of given type.

Parameters:
  • type – Facet type
Returns:

Facets of given type.

facets

Iterable<IFacet> facets()
Returns:All facets.

hasFacet

boolean hasFacet(Class<? extends IFacet> type)

Checks if there is at least one facet of given type.

Parameters:
  • type – Facet type.
Returns:

True if at least one facet of given type exists, false otherwise.