Class QuarkusClassFileLocator

java.lang.Object
io.quarkus.hibernate.orm.deployment.integration.QuarkusClassFileLocator
All Implemented Interfaces:
Closeable, AutoCloseable, net.bytebuddy.dynamic.ClassFileLocator

public final class QuarkusClassFileLocator extends Object implements net.bytebuddy.dynamic.ClassFileLocator
Custom implementation of a ClassFileLocator which will load resources from the context classloader which is set at the time of the locate() operation is being performed. Using a regular ForClassLoader implementation would capture the currently set ClassLoader and keep a reference to it, while we need it to look for a fresh copy during the enhancement. Additionally, we might be able to optimize how the resource is actually being loaded as we control the ClassLoader implementations (Such further optimisations are not implemented yet).
  • Nested Class Summary

    Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.ClassFileLocator

    net.bytebuddy.dynamic.ClassFileLocator.Compound, net.bytebuddy.dynamic.ClassFileLocator.Filtering, net.bytebuddy.dynamic.ClassFileLocator.ForClassLoader, net.bytebuddy.dynamic.ClassFileLocator.ForFolder, net.bytebuddy.dynamic.ClassFileLocator.ForInstrumentation, net.bytebuddy.dynamic.ClassFileLocator.ForJarFile, net.bytebuddy.dynamic.ClassFileLocator.ForModule, net.bytebuddy.dynamic.ClassFileLocator.ForModuleFile, net.bytebuddy.dynamic.ClassFileLocator.ForUrl, net.bytebuddy.dynamic.ClassFileLocator.MultiReleaseAware, net.bytebuddy.dynamic.ClassFileLocator.NoOp, net.bytebuddy.dynamic.ClassFileLocator.PackageDiscriminating, net.bytebuddy.dynamic.ClassFileLocator.Resolution, net.bytebuddy.dynamic.ClassFileLocator.Simple
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     

    Fields inherited from interface net.bytebuddy.dynamic.ClassFileLocator

    CLASS_FILE_EXTENSION, META_INF_VERSIONS
  • Method Summary

    Modifier and Type
    Method
    Description
    void
     
    net.bytebuddy.dynamic.ClassFileLocator.Resolution
    locate(String name)
     

    Methods inherited from class java.lang.Object

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

  • Method Details

    • locate

      public net.bytebuddy.dynamic.ClassFileLocator.Resolution locate(String name) throws IOException
      Specified by:
      locate in interface net.bytebuddy.dynamic.ClassFileLocator
      Throws:
      IOException
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable