接口 ResourceLoader

    • 方法详细资料

      • found0

        @Nullable
        @Contract(pure=true)
        InputStream found0​(@NotNull
                           String path,
                           @Nullable
                           ClassLoader loader)
        This is for lambda.

        If you are calling found(String, ClassLoader) directly, please do this public InputStream found0(@NotNull String path, @Nullable ClassLoader loader){return null;}

        Do not call found(String, ClassLoader) in this method. Otherwise it will lead to an infinite loop

        Use found if it is used externally, do not call this method.

         
         ResourceLoader loader = ....;
         // loader.found0(......);
         InputStream res = loader.found("META-INF/MANIFEST.MF", ClassLoader.getSystemClassLoader());
         
         

        Call specification: Never use found0(String, ClassLoader)

        参数:
        path - The path of need found.
        loader - The class loader using
        返回:
        The resource
        另请参阅:
        found(String, ClassLoader)
      • found

        @Nullable
        @Contract(pure=true)
        default InputStream found​(@NotNull
                                  String path,
                                  @Nullable
                                  ClassLoader loader)
        Find the resource with path.

        Call specification: Never use found0(String, ClassLoader)

        参数:
        path - The resource path.
        loader - ResourceLoader?
        返回:
        The resource founded.