Interface CodeSourceURIProvider<M>

  • Type Parameters:
    M - The modularity attachment to use, see BytecodeProvider. In general, the modularity attachment maps 1:1 to a given URI, and vice-versa. However that is not guaranteed, as a modularity attachment can at times map several directories (e.g. J8 compiled source, J9 compiled sources and resource directories) to a single module. In order to still be able to differentiate between the individual sources, the name of the class is passed in too.

    @AvailableSince("0.7.0-a20241008")
    public interface CodeSourceURIProvider<M>
    An extension to the BytecodeProvider interface which creates support for obtaining the URI where a resource (usually a mixin class) is located on the filesystem. The returned URI is akin to CodeSource.getLocation(), that is it only returns the jar or directory in which the resource is located in. This functionality is at this point in time only intended for use in JSR-45 SMAPs (see ClassNode.sourceDebug) in the "jdt" stratum and is intended to improve debugging support under eclipse when the mixin classes are not present within the source files but rather already compiled on the runtime classpath.
    Since:
    0.7.0-a20241008
    • Method Detail

      • findURI

        @Nullable
        java.net.URI findURI​(M modularityAttachment,
                             @NotNull
                             java.lang.String internalClassName)