public interface

FieldWriter

com.google.gwt.uibinder.rebind.FieldWriter

Class Overview

Models a field to be written in the generated binder code. Note that this is not necessarily a field that the user has declared. It's basically any variable the generated UiBinder#createAndBindUi implementation will need.

A field can have a custom initialization statement, set via setInitializer(String). Without one it will be initialized via a create(Class) call. (In the rare case that you need a field not to be initialized, initialize it to "null".)

Dependencies can be declared between fields via needs(FieldWriter), to ensure that one can be initialized via reference to another. Circular references are not supported, nor detected.

Summary

Public Methods
abstract JClassType getAssignableType()
Returns the type of this field, or for generated types the type it extends.
abstract String getInitializer()
Returns the custom initializer for this field, or null if it is not set.
abstract JClassType getInstantiableType()
Returns the type of this field, or null if this field is of a type that has not yet been generated.
abstract String getQualifiedSourceName()
Returns the qualified source name of this type.
abstract JType getReturnType(String[] path, MonitoredLogger logger)
Returns the return type found at the end of the given method call path, which must begin with the receiver's name, or null if the path is invalid.
abstract void needs(FieldWriter f)
Declares that the receiver depends upon the given field.
abstract void setInitializer(String initializer)
Used to provide an initializer string to use instead of a com.google.gwt.core.client.GWT#create() call.
abstract void write(IndentedWriter w)
Write the field delcaration.

Public Methods

public abstract JClassType getAssignableType ()

Returns the type of this field, or for generated types the type it extends.

public abstract String getInitializer ()

Returns the custom initializer for this field, or null if it is not set.

public abstract JClassType getInstantiableType ()

Returns the type of this field, or null if this field is of a type that has not yet been generated.

public abstract String getQualifiedSourceName ()

Returns the qualified source name of this type.

public abstract JType getReturnType (String[] path, MonitoredLogger logger)

Returns the return type found at the end of the given method call path, which must begin with the receiver's name, or null if the path is invalid.

public abstract void needs (FieldWriter f)

Declares that the receiver depends upon the given field.

public abstract void setInitializer (String initializer)

Used to provide an initializer string to use instead of a com.google.gwt.core.client.GWT#create() call. Note that this is an RHS expression. Don't include the leading '=', and don't end it with ';'.

Throws
UnableToCompleteException
IllegalStateException on second attempt to set the initializer

public abstract void write (IndentedWriter w)

Write the field delcaration.

Throws
UnableToCompleteException