public abstract class

PlaceholderInterpreter

extends Object
implements XMLElement.PostProcessingInterpreter<T>
java.lang.Object
   ↳ com.google.gwt.uibinder.rebind.messages.PlaceholderInterpreter
Known Direct Subclasses

Class Overview

Abstract class performs the heavy lifting for processing ph children of a msg element.

Summary

Fields
protected final MessageWriter message
protected final Tokenator tokenator
protected final UiBinderWriter uiWriter
Public Constructors
PlaceholderInterpreter(UiBinderWriter writer, MessageWriter message)
Public Methods
String interpretElement(XMLElement elem)
Given an XMLElement, return its filtered value.
String postProcess(String consumed)
Called by various XMLElement consumeInner*() methods after all elements have been handed to interpretElement(XMLElement).
Protected Methods
abstract String consumePlaceholderInnards(XMLElement elem)
String nextPlaceholder(String name, String example, String value)
To be called from interpretElement(XMLElement).
String stripTokens(String value)
[Expand]
Inherited Methods
From class java.lang.Object
From interface com.google.gwt.uibinder.rebind.XMLElement.Interpreter
From interface com.google.gwt.uibinder.rebind.XMLElement.PostProcessingInterpreter

Fields

protected final MessageWriter message

protected final Tokenator tokenator

protected final UiBinderWriter uiWriter

Public Constructors

public PlaceholderInterpreter (UiBinderWriter writer, MessageWriter message)

Public Methods

public String interpretElement (XMLElement elem)

Given an XMLElement, return its filtered value.

Throws
UnableToCompleteException

public String postProcess (String consumed)

Called by various XMLElement consumeInner*() methods after all elements have been handed to interpretElement(XMLElement).

Performs escaping on the consumed text to make it safe for use as a Messages @Default value

Throws
UnableToCompleteException

Protected Methods

protected abstract String consumePlaceholderInnards (XMLElement elem)

Throws
UnableToCompleteException

protected String nextPlaceholder (String name, String example, String value)

To be called from interpretElement(XMLElement). Creates the next placeholder in the MessageWriter we're building, and returns the text to stand in its place.

protected String stripTokens (String value)