com.google.gwt.uibinder.elementparsers

## Class WidgetPlaceholderInterpreter

- java.lang.Object
- - com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter
  - - com.google.gwt.uibinder.elementparsers.HtmlPlaceholderInterpreter
    - - com.google.gwt.uibinder.elementparsers.WidgetPlaceholderInterpreter

All Implemented Interfaces:
  com.google.gwt.uibinder.rebind.XMLElement.Interpreter<java.lang.String>, com.google.gwt.uibinder.rebind.XMLElement.PostProcessingInterpreter<java.lang.String>

    class WidgetPlaceholderInterpreter
    extends HtmlPlaceholderInterpreter

Used by `HTMLPanelParser`. Refines `HtmlPlaceholderInterpreter` to allow widgets to appear inside msg elements in an HTMLPanel.

HasText and HasHTML get special treatment, where their innerText or innerHTML become part of the @Default value of the message being generated. E.g., this markup in an HTMLPanel:

     Hello <gwt:HyperLink>click here</gwt:HyperLink> thank you.

becomes a message like this:

      @Default("Hello {0}click here{1} thank you.")
     String getMessage1(
        @Example("<span>") String widget1Begin,
        @Example("</span>") String widget1End
     );

The contents of other widget types are opaque to the message, and are covered by a single placeholder. One implication of this is that the content of an HTMLPanel inside a msg in another HTMLPanel must always be in a separate message.

### Field Summary

### Fields inherited from class com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter

`message, tokenator, uiWriter`

### Constructor Summary

Constructors
Constructor and Description
`WidgetPlaceholderInterpreter(java.lang.String fieldName, com.google.gwt.uibinder.rebind.UiBinderWriter writer, com.google.gwt.uibinder.rebind.messages.MessageWriter message, java.lang.String ancestorExpression)`

### Method Summary

All Methods Instance Methods Concrete Methods
`java.lang.String` `interpretElement(com.google.gwt.uibinder.rebind.XMLElement elem)` Given an XMLElement, return its filtered value.
`java.lang.String` `postProcess(java.lang.String consumed)` Called by `XMLElement.consumeInnerHtml(com.google.gwt.uibinder.rebind.XMLElement.Interpreter<java.lang.String>)` after all elements have been handed to `interpretElement(com.google.gwt.uibinder.rebind.XMLElement)`.

### Methods inherited from class com.google.gwt.uibinder.elementparsers.HtmlPlaceholderInterpreter

`consumePlaceholderInnards, nextClosePlaceholder, nextOpenPlaceholder`

### Methods inherited from class com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter

`nextPlaceholder, stripTokens`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### WidgetPlaceholderInterpreter

    WidgetPlaceholderInterpreter(java.lang.String fieldName,
                                 com.google.gwt.uibinder.rebind.UiBinderWriter writer,
                                 com.google.gwt.uibinder.rebind.messages.MessageWriter message,
                                 java.lang.String ancestorExpression)

### Method Detail

#### interpretElement

    public java.lang.String interpretElement(com.google.gwt.uibinder.rebind.XMLElement elem)
                                      throws UnableToCompleteException

Description copied from interface: `com.google.gwt.uibinder.rebind.XMLElement.Interpreter`
Given an XMLElement, return its filtered value.

Specified by:
  `interpretElement` in interface `com.google.gwt.uibinder.rebind.XMLElement.Interpreter<java.lang.String>`
Overrides:
  `interpretElement` in class `HtmlPlaceholderInterpreter`
Throws:
  `UnableToCompleteException` - on error

#### postProcess

    public java.lang.String postProcess(java.lang.String consumed)
                                 throws UnableToCompleteException

Called by `XMLElement.consumeInnerHtml(com.google.gwt.uibinder.rebind.XMLElement.Interpreter<java.lang.String>)` after all elements have been handed to `interpretElement(com.google.gwt.uibinder.rebind.XMLElement)`.

Specified by:
  `postProcess` in interface `com.google.gwt.uibinder.rebind.XMLElement.PostProcessingInterpreter<java.lang.String>`
Overrides:
  `postProcess` in class `com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter`
Throws:
  `UnableToCompleteException`