Class AttributeNormalizer

java.lang.Object
org.eclipse.jetty.quickstart.AttributeNormalizer

public class AttributeNormalizer extends 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}
  • Constructor Details

    • AttributeNormalizer

      public AttributeNormalizer(Resource baseResource)
  • Method Details

    • toCanonicalURI

      public static URI toCanonicalURI(URI uri)
    • toCanonicalURI

      public static String toCanonicalURI(String uri)
    • toCanonicalPath

      public static Path toCanonicalPath(String path)
    • normalize

      public String normalize(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 String normalizeUri(URI uri)
    • normalizePath

      protected String normalizePath(Path path)
    • expand

      public String expand(String str)
    • expand

      public String expand(String str, Stack<String> seenStack)