Class WritableTypeRegistry

  • Direct Known Subclasses:
    SimpleTypeRegistry

    public abstract class WritableTypeRegistry
    extends TypeRegistry
    Registry for declared types referenced in a specific program context. The registry itself does not have a context per se, as these may reference each other recursively.
    • Constructor Detail

      • WritableTypeRegistry

        public WritableTypeRegistry()
    • Method Detail

      • registerConstant

        public abstract void registerConstant​(@Nonnull
                                              TypeReference reference,
                                              @Nonnull
                                              PValueProvider value)
        Register a constant value.
        Parameters:
        reference - The constant reference.
        value - The constant value.
      • registerService

        public abstract void registerService​(@Nonnull
                                             PService service)
        Services are not handled as "declared types", so they need to be registered separately.
        Parameters:
        service - the service to register.
      • registerType

        public abstract <T> void registerType​(PDeclaredDescriptor<T> declaredType)
        Register a declared type.
        Type Parameters:
        T - The declared java type.
        Parameters:
        declaredType - The descriptor for the type.
      • registerTypedef

        public abstract void registerTypedef​(@Nonnull
                                             TypeReference reference,
                                             @Nonnull
                                             TypeReference target)
        Registers a typedef definition. This is a pair of two type references. One for the reference itself, and one for the target type definition, including the local program context where it was defined.
        Parameters:
        reference - The typedef reference source..
        target - The qualified type definition that the name represents with it's own context.