Class AttributeNormalizer


  • public class AttributeNormalizer
    extends java.lang.Object
    Normalize Attribute to String.

    Replaces and expands:

    • ${WAR}
    • ${WAR.path}
    • ${WAR.uri}
    • ${jetty.base}
    • ${jetty.base.uri}
    • ${jetty.home}
    • ${jetty.home.uri}
    • ${user.home}
    • ${user.home.uri}
    • ${user.dir}
    • ${user.dir.uri}
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String expand​(java.lang.String str)  
      java.lang.String expand​(java.lang.String str, java.util.Stack<java.lang.String> seenStack)  
      java.lang.String normalize​(java.lang.Object o)
      Normalize a URI, URL, or File reference by replacing known attributes with ${key} attributes.
      protected java.lang.String normalizePath​(java.nio.file.Path path)  
      protected java.lang.String normalizeUri​(java.net.URI uri)  
      static java.nio.file.Path toCanonicalPath​(java.lang.String path)  
      static java.lang.String toCanonicalURI​(java.lang.String uri)  
      static java.net.URI toCanonicalURI​(java.net.URI uri)  
      • Methods inherited from class java.lang.Object

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

      • AttributeNormalizer

        public AttributeNormalizer​(Resource baseResource)
    • Method Detail

      • toCanonicalURI

        public static java.net.URI toCanonicalURI​(java.net.URI uri)
      • toCanonicalURI

        public static java.lang.String toCanonicalURI​(java.lang.String uri)
      • toCanonicalPath

        public static java.nio.file.Path toCanonicalPath​(java.lang.String path)
      • normalize

        public java.lang.String normalize​(java.lang.Object o)
        Normalize a URI, URL, or File reference by replacing known attributes with ${key} attributes.
        Parameters:
        o - the object to normalize into a string
        Returns:
        the string representation of the object, with expansion keys.
      • normalizeUri

        protected java.lang.String normalizeUri​(java.net.URI uri)
      • normalizePath

        protected java.lang.String normalizePath​(java.nio.file.Path path)
      • expand

        public java.lang.String expand​(java.lang.String str)
      • expand

        public java.lang.String expand​(java.lang.String str,
                                       java.util.Stack<java.lang.String> seenStack)