GWT 2.7.0

com.google.gwt.uibinder.attributeparsers
Class StrictAttributeParser

java.lang.Object
  extended by com.google.gwt.uibinder.attributeparsers.StrictAttributeParser
All Implemented Interfaces:
AttributeParser
Direct Known Subclasses:
BooleanAttributeParser, DoubleAttributeParser, EnumAttributeParser, HorizontalAlignmentConstantParser, IntAttributeParser, SafeUriAttributeParser, TextAlignConstantParser, VerticalAlignmentConstantParser

 class StrictAttributeParser
extends java.lang.Object
implements AttributeParser

Fall through attribute parser. Accepts a field reference or nothing.


Nested Class Summary
(package private) static class StrictAttributeParser.FieldReferenceDelegate
          Package protected for testing.
 
Field Summary
protected  com.google.gwt.uibinder.rebind.MortalLogger logger
           
 
Constructor Summary
StrictAttributeParser(FieldReferenceConverter converter, com.google.gwt.uibinder.rebind.MortalLogger logger, JType... types)
           
 
Method Summary
 java.lang.String parse(com.google.gwt.uibinder.rebind.XMLElement source, java.lang.String value)
          If the value holds a single field reference "{like.this}", converts it to a Java Expression.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final com.google.gwt.uibinder.rebind.MortalLogger logger
Constructor Detail

StrictAttributeParser

StrictAttributeParser(FieldReferenceConverter converter,
                      com.google.gwt.uibinder.rebind.MortalLogger logger,
                      JType... types)
Method Detail

parse

public java.lang.String parse(com.google.gwt.uibinder.rebind.XMLElement source,
                              java.lang.String value)
                       throws UnableToCompleteException
If the value holds a single field reference "{like.this}", converts it to a Java Expression.

In any other case (e.g. more than one field reference), an UnableToCompleteException is thrown.

Specified by:
parse in interface AttributeParser
Parameters:
source - the source code the value came from, for error reporting purposes
value - the attribute value to be parsed
Returns:
a valid Java expression
Throws:
UnableToCompleteException - on parse error

GWT 2.7.0