Module java.base

Interface ConstantDesc

    • Method Summary

      Modifier and Type Method Description
      Object resolveConstantDesc​(MethodHandles.Lookup lookup)
      Resolves this descriptor reflectively, emulating the resolution behavior of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4.
    • Method Detail

      • resolveConstantDesc

        Object resolveConstantDesc​(MethodHandles.Lookup lookup)
                            throws ReflectiveOperationException
        Resolves this descriptor reflectively, emulating the resolution behavior of JVMS 5.4.3 and the access control behavior of JVMS 5.4.4. The resolution and access control context is provided by the MethodHandles.Lookup parameter. No caching of the resulting value is performed.
        Parameters:
        lookup - The MethodHandles.Lookup to provide name resolution and access control context
        Returns:
        the resolved constant value
        Throws:
        ReflectiveOperationException - if a class, method, or field could not be reflectively resolved in the course of resolution
        LinkageError - if a linkage error occurs
        See The Java™ Virtual Machine Specification:
        5.4.3 Resolution, 5.4.4 Access Control