Interface MetadataHandlerProvider

All Known Implementing Classes:
JaninoRelMetadataProvider, ProxyingMetadataHandlerProvider

public interface MetadataHandlerProvider
Provides MetadataHandler call sites for RelMetadataQuery. The handlers provided are responsible for updating the cache stored in RelMetadataQuery.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static class 
    Exception that indicates there there should be a handler for this class but there is not.
  • Method Summary

    Modifier and Type
    Method
    Description
    <MH extends MetadataHandler<?>>
    MH
    handler(Class<MH> handlerClass)
    Provide a handler for the requested metadata class.
    default <MH extends MetadataHandler<?>>
    MH
    revise(Class<MH> handlerClass)
    Revise the handler for a given kind of metadata.
  • Method Details

    • handler

      <MH extends MetadataHandler<?>> MH handler(Class<MH> handlerClass)
      Provide a handler for the requested metadata class.
      Type Parameters:
      MH - The metadata type the handler relates to.
      Parameters:
      handlerClass - The handler interface expected
      Returns:
      The handler implementation.
    • revise

      default <MH extends MetadataHandler<?>> MH revise(Class<MH> handlerClass)
      Revise the handler for a given kind of metadata.

      Should be invoked if the existing handler throws a MetadataHandlerProvider.NoHandler exception.

      Type Parameters:
      MH - The type metadata the handler provides.
      Parameters:
      handlerClass - The type of class to revise.
      Returns:
      A new handler that should be used instead of any previous handler provided.