Class Resource.ResourceOnClassloader

  • Enclosing class:
    Resource

    public static final class Resource.ResourceOnClassloader
    extends java.lang.Object
    Builder for resource that is present on classpath of supplied ClassLoader.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Resource withPath​(java.lang.String firstPathToken, java.lang.String... otherTokens)
      Returns builder for resource with defined path on a classpath of classloader of this builder.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • withPath

        public Resource withPath​(java.lang.String firstPathToken,
                                 java.lang.String... otherTokens)
        Returns builder for resource with defined path on a classpath of classloader of this builder.

        Those two operations are equivalent:

             withPath("/com/adelean/junit/jupiter/resource.txt")
        
             // equivalent to
        
             withPath("/com/adelean/junit/jupiter", "resource.txt")
         
        Parameters:
        firstPathToken - path of resource, it least one token
        otherTokens - path of resource, allows multiple tokens
        Returns:
        Resource resource builder