Class ClassPathNode


  • public class ClassPathNode
    extends java.lang.Object
    Node on the class path that may be retrieved as a HttpResource.
    Author:
    Daniel Sagenschneider
    • Constructor Detail

      • ClassPathNode

        public ClassPathNode​(java.lang.String nodePath,
                             java.lang.String resourcePath,
                             java.lang.String classPath,
                             boolean isDirectory)
        Initiate.
        Parameters:
        nodePath - Path of this node relative to its parent.
        resourcePath - HttpResource path to this node.
        classPath - Class path to this node.
        isDirectory - true if this node is a directory (otherwise a file).
    • Method Detail

      • createClassPathResourceTree

        public static ClassPathNode createClassPathResourceTree​(java.lang.String classpathPrefix)
        Creates the ClassPathNode tree for available HttpResource instances.
        Parameters:
        classpathPrefix - The prefix on the class path to locate resources for the tree. null for the entire class path.
        Returns:
        ClassPathNode.
      • getNodePath

        public java.lang.String getNodePath()
        Obtains the path of this ClassPathNode from its parent.
        Returns:
        Path of this ClassPathNode from its parent.
      • getResourcePath

        public java.lang.String getResourcePath()
        Obtains the HttpResource path.
        Returns:
        HttpResource path.
      • getClassPath

        public java.lang.String getClassPath()
        Obtains the class path for this HttpResource.
        Returns:
        Class path.
      • isDirectory

        public boolean isDirectory()
        Indicates if this is a directory.
        Returns:
        true if this is a directory.
      • getChild

        public ClassPathNode getChild​(java.lang.String childNodePath)
        Obtains the child ClassPathNode by the name.
        Parameters:
        childNodePath - Child node path.
        Returns:
        Child ClassPathNode or null if no child by node path.