Class Resources.PackageResource

java.lang.Object
io.cucumber.core.resource.Resources.PackageResource
All Implemented Interfaces:
Resource
Enclosing class:
Resources

private static class Resources.PackageResource extends Object implements Resource
  • Field Details

    • resource

      private final Path resource
    • uri

      private final URI uri
  • Constructor Details

    • PackageResource

      PackageResource(Path baseDir, String packageName, Path resource)
  • Method Details

    • getUri

      public URI getUri()
      Description copied from interface: Resource
      Returns a uri representing this resource.

      Resources on the classpath will have the form classpath:com/example.feature while resources on the file system will have the form file:/path/to/example.feature. Other resources will be represented by their exact uri.

      Specified by:
      getUri in interface Resource
      Returns:
      a uri representing this resource
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface Resource
      Throws:
      IOException