Interface ApplicationAdapter

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      <T> T getAttribute​(java.lang.String name)
      Returns the value for an attribute with the given name.
      java.util.Enumeration<java.lang.String> getAttributeNames()
      Returns an Enumeration containing the names of the attributes available to this application.
      java.lang.String getBasePath()
      Returns the base path that the current application is mapped to.
      java.lang.ClassLoader getClassLoader()
      Returns the class loader used by the current application.
      void removeAttribute​(java.lang.String name)
      Removes an attribute set with the given name.
      void setAttribute​(java.lang.String name, java.lang.Object value)
      Sets the value for the attribute of the given name, replacing an existing value (if any).
      java.lang.String toRealPath​(java.lang.String filePath)
      Returns the real path of the existing file as a canonical pathname string.
      java.io.File toRealPathAsFile​(java.lang.String filePath)
      Returns the real path of an existing file.
    • Method Detail

      • getClassLoader

        java.lang.ClassLoader getClassLoader()
        Returns the class loader used by the current application.
        Returns:
        the class loader
      • getBasePath

        java.lang.String getBasePath()
        Returns the base path that the current application is mapped to.
        Returns:
        the base path for this application
      • toRealPath

        java.lang.String toRealPath​(java.lang.String filePath)
                             throws java.io.IOException
        Returns the real path of the existing file as a canonical pathname string.
        Parameters:
        filePath - the relative path or classpath of the file to find
        Returns:
        the canonical pathname string of the found file
        Throws:
        java.io.IOException - If there is no file corresponding to the classpath, an exception is thrown, and if it is not the classpath, no exception is thrown because the File instance is returned regardless of the existence of the file.
      • toRealPathAsFile

        java.io.File toRealPathAsFile​(java.lang.String filePath)
                               throws java.io.IOException
        Returns the real path of an existing file.
        Parameters:
        filePath - the relative path or classpath of the file to find
        Returns:
        the real path of the found file
        Throws:
        java.io.IOException - If there is no file corresponding to the classpath, an exception is thrown, and if it is not the classpath, no exception is thrown because the File instance is returned regardless of the existence of the file.
      • getAttribute

        <T> T getAttribute​(java.lang.String name)
        Returns the value for an attribute with the given name.
        Type Parameters:
        T - the value type
        Parameters:
        name - the name of the attribute
        Returns:
        the value for the attribute
      • setAttribute

        void setAttribute​(java.lang.String name,
                          java.lang.Object value)
        Sets the value for the attribute of the given name, replacing an existing value (if any).
        Parameters:
        name - the name of the attribute
        value - the value for the attribute
      • getAttributeNames

        java.util.Enumeration<java.lang.String> getAttributeNames()
        Returns an Enumeration containing the names of the attributes available to this application.
        Returns:
        the attribute names
      • removeAttribute

        void removeAttribute​(java.lang.String name)
        Removes an attribute set with the given name.
        Parameters:
        name - the name of the attribute to be removed