Class ClasspathResourceSource

    • Method Detail

      • from

        public static ClasspathResourceSource from​(java.lang.String classpathResourceName)
        Create a new ClasspathResourceSource using the supplied classpath resource name.

        The name of a classpath resource must follow the semantics for resource paths as defined in ClassLoader.getResource(String).

        If the supplied classpath resource name is prefixed with a slash (/), the slash will be removed.

        Parameters:
        classpathResourceName - the name of the classpath resource; never null or blank
        See Also:
        ClassLoader.getResource(String), ClassLoader.getResourceAsStream(String), ClassLoader.getResources(String)
      • from

        public static ClasspathResourceSource from​(java.lang.String classpathResourceName,
                                                   FilePosition filePosition)
        Create a new ClasspathResourceSource using the supplied classpath resource name and FilePosition.

        The name of a classpath resource must follow the semantics for resource paths as defined in ClassLoader.getResource(String).

        If the supplied classpath resource name is prefixed with a slash (/), the slash will be removed.

        Parameters:
        classpathResourceName - the name of the classpath resource; never null or blank
        filePosition - the position in the classpath resource; may be null
      • getClasspathResourceName

        public java.lang.String getClasspathResourceName​()
        Get the name of the source classpath resource.

        The name of a classpath resource follows the semantics for resource paths as defined in ClassLoader.getResource(String).

        See Also:
        ClassLoader.getResource(String), ClassLoader.getResourceAsStream(String), ClassLoader.getResources(String)
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode​()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString​()
        Overrides:
        toString in class java.lang.Object