|
GWT 2.4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.uibinder.attributeparsers.FieldReferenceConverter
public class FieldReferenceConverter
Deals with field references, e.g. the bits in braces here: <div
class="{style.enabled} fancy {style.impressive}" />
, by converting
them to java expressions (with the help of a
Delegate
).
A field reference is one or more segments separated by dots. The first
segment is considered to be a reference to a ui field, and succeeding
segments are method calls. So, "{able.baker.charlie}"
becomes
"able.baker().charlie()"
.
A field reference starts with '{' and is followed immediately by a character that can legally start a java identifier—that is a letter, $, or underscore. Braces not followed by such a character are left in place.
For convenience when dealing with generated CssResources, field segments with dashes are converted to camel case. That is, {able.baker-charlie} is the same as {able.bakerCharlie}
Opening braces may be escape by doubling them. That is, "{{foo}" will converted to "{foo}", with no field reference detected.
Nested Class Summary | |
---|---|
static class |
FieldReferenceConverter.IllegalFieldReferenceException
May be thrown by the Delegate
for badly formatted input. |
Method Summary | |
---|---|
java.lang.String |
convert(java.lang.String in,
com.google.gwt.uibinder.attributeparsers.FieldReferenceConverter.Delegate delegate)
|
static boolean |
hasFieldReferences(java.lang.String string)
Returns true if the given string holds one or more field references. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static boolean hasFieldReferences(java.lang.String string)
public java.lang.String convert(java.lang.String in, com.google.gwt.uibinder.attributeparsers.FieldReferenceConverter.Delegate delegate)
FieldReferenceConverter.IllegalFieldReferenceException
- if the delegate does
|
GWT 2.4.0 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |