Package org.eclipse.jetty.quickstart
Class AttributeNormalizer
- java.lang.Object
-
- org.eclipse.jetty.quickstart.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}
-
-
Constructor Summary
Constructors Constructor Description AttributeNormalizer(Resource baseResource)
-
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)
-
-
-
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)
-
-