Interface IDirectTypeRegistryAccess

  • All Known Implementing Classes:
    TypeRegistry.DirectAccess

    public interface IDirectTypeRegistryAccess
    Provides direct access to the type registration for ITypeResolver. This interface helps protecting the inner registry while providing write access to related type resolvers.
    Author:
    Holger Eichelberger
    • Method Detail

      • add

        void add​(java.lang.String name,
                 TypeDescriptor<?> type)
        Adds a type.
        Parameters:
        name - the name of the type
        type - the type to be added
      • contains

        boolean contains​(java.lang.String name)
        Returns whether the type given by name is already registered.
        Parameters:
        name - the name of the type
        Returns:
        true if it was registered, false else
      • get

        TypeDescriptor<?> get​(java.lang.String name)
        Returns the type descriptor registered for name.
        Parameters:
        name - the name of the type
        Returns:
        the registered descriptor (may be null if none was registered)
      • addInstantiator

        void addInstantiator​(java.lang.String name,
                             TypeDescriptor<? extends IVilType> type)
        Adds an instantiator.
        Parameters:
        name - the name of the instantiator
        type - the type to be added
      • containsInstantiator

        boolean containsInstantiator​(java.lang.String name)
        Returns whether the instantiator given by name is already registered.
        Parameters:
        name - the name of the instantiator
        Returns:
        true if it was registered, false else