Interface ObjectLoader


  • public interface ObjectLoader
    A segment of code generation which produces the necessary instructions to load the given object. The result handle is cached for reuse.
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean canHandleObject​(Object obj, boolean staticInit)
      Returns true if this object loader can handle the given object
      io.quarkus.gizmo.ResultHandle load​(io.quarkus.gizmo.BytecodeCreator body, Object obj, boolean staticInit)
      Load the given object if possible.
    • Method Detail

      • load

        io.quarkus.gizmo.ResultHandle load​(io.quarkus.gizmo.BytecodeCreator body,
                                           Object obj,
                                           boolean staticInit)
        Load the given object if possible.
        Parameters:
        body - the body to use for bytecode generation (not null)
        obj - the object to substitute (not null)
        staticInit - true if this loader is for a static init method, false otherwise
        Returns:
        the result handle of the value, or null if this loader cannot load the given object
      • canHandleObject

        boolean canHandleObject​(Object obj,
                                boolean staticInit)
        Returns true if this object loader can handle the given object
        Parameters:
        obj - The object
        staticInit - If this is static init phase
        Returns:
        true if this loader can handle the object