Interface DefinitionSpace

All Known Implementing Classes:
DefinitionSpaceWritable

public interface DefinitionSpace
DefinitionSpace represents a space for managing and resolving definitions. It is not thread-safe. Definitions within this space can be checked, resolved, and retrieved based on their names and types.
Author:
mlaroche
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Checks if this container contains a definition with the specified name.
    <C extends Definition>
    Set<C>
    getAll(Class<C> clazz)
    Gets an ordered set of all objects for a specified definition type.
    Set<Class<? extends Definition>>
    Gets a list of all types of definitions managed within this space.
    <D extends Definition>
    D
    resolve(String name, Class<D> clazz)
    Resolves a definition from its name and class type.
  • Method Details

    • contains

      boolean contains(String name)
      Checks if this container contains a definition with the specified name.
      Parameters:
      name - the name of the definition to check
      Returns:
      true if the definition is already registered, false otherwise
    • resolve

      <D extends Definition> D resolve(String name, Class<D> clazz)
      Resolves a definition from its name and class type.
      Type Parameters:
      D - Type of the definition
      Parameters:
      name - the name of the definition to resolve
      clazz - the class type of the definition
      Returns:
      the resolved definition
    • getAllTypes

      Set<Class<? extends Definition>> getAllTypes()
      Gets a list of all types of definitions managed within this space.
      Returns:
      a set of classes representing the types of definitions
    • getAll

      <C extends Definition> Set<C> getAll(Class<C> clazz)
      Gets an ordered set of all objects for a specified definition type.
      Type Parameters:
      C - Type of the definition
      Parameters:
      clazz - the class type of the definition
      Returns:
      an ordered set of all objects for the specified definition type