public class SafeUriAttributeParser extends Object
SafeUri
literals or
references.
Simple String literals are passed through
UriUtils.fromConstantString(String)
Accepts concatenated string expressions, mainly for compatibility with legacy
<a href="{foo.bar}{baz.bang}">
abuses. Passes such nonsense
through UriUtils.fromString(String)
Modifier and Type | Field and Description |
---|---|
protected MortalLogger |
logger |
Modifier and Type | Method and Description |
---|---|
String |
parse(XMLElement source,
String value)
If the value holds a single field reference "{like.this}", converts it to a
Java Expression.
|
static String |
wrapUnsafeStringAndWarn(MortalLogger logger,
XMLElement source,
String expression) |
protected final MortalLogger logger
public static String wrapUnsafeStringAndWarn(MortalLogger logger, XMLElement source, String expression)
public String parse(XMLElement source, String value) throws com.google.gwt.core.ext.UnableToCompleteException
In any other case (e.g. more than one field reference), an UnableToCompleteException is thrown.
parse
in interface AttributeParser
source
- the source code the value came from, for error reporting purposesvalue
- the attribute value to be parsedcom.google.gwt.core.ext.UnableToCompleteException
- on parse errorCopyright © 2016. All rights reserved.