Class H2JDBCReflections

java.lang.Object
io.quarkus.jdbc.h2.deployment.H2JDBCReflections

public final class H2JDBCReflections extends Object
Registers the org.h2.Driver so that it can be loaded by reflection, as commonly expected.
Author:
Sanne Grinovero <sanne@hibernate.org>
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    build(io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem> reflectiveClass)
     
    (package private) io.quarkus.deployment.builditem.NativeImageFeatureBuildItem
     
    (package private) io.quarkus.deployment.builditem.IndexDependencyBuildItem
    We need to index the H2 database core jar so to include custom extension types it's loading via reflection.
    (package private) io.quarkus.deployment.builditem.GeneratedResourceBuildItem
    listBasicDataTypes(io.quarkus.deployment.builditem.CombinedIndexBuildItem index)
    All implementors of DataType which have an INSTANCE field need this field to be accessible via reflection.
    (package private) io.quarkus.deployment.builditem.GeneratedResourceBuildItem
    listStatefulDataTypeFactories(io.quarkus.deployment.builditem.CombinedIndexBuildItem index)
    All implementors of StatefulDataType.Factory might get loaded reflectively.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • H2JDBCReflections

      public H2JDBCReflections()
  • Method Details

    • build

      void build(io.quarkus.deployment.annotations.BuildProducer<io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem> reflectiveClass)
    • enableH2Feature

      io.quarkus.deployment.builditem.NativeImageFeatureBuildItem enableH2Feature()
    • indexH2Library

      io.quarkus.deployment.builditem.IndexDependencyBuildItem indexH2Library()
      We need to index the H2 database core jar so to include custom extension types it's loading via reflection.
    • listStatefulDataTypeFactories

      io.quarkus.deployment.builditem.GeneratedResourceBuildItem listStatefulDataTypeFactories(io.quarkus.deployment.builditem.CombinedIndexBuildItem index)
      All implementors of StatefulDataType.Factory might get loaded reflectively. While we could hardcode the list included in H2, we prefer looking them up via Jandex so to also load custom implementations optionally provided by user code.
    • listBasicDataTypes

      io.quarkus.deployment.builditem.GeneratedResourceBuildItem listBasicDataTypes(io.quarkus.deployment.builditem.CombinedIndexBuildItem index)
      All implementors of DataType which have an INSTANCE field need this field to be accessible via reflection. While we could hardcode the list included in H2, we prefer looking them up via Jandex so to also load custom implementations optionally provided by user code.