|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.google.gwt.uibinder.rebind.FieldManager
public class FieldManager
This class handles all FieldWriter instances created for the current
template.
| Constructor Summary | |
|---|---|
FieldManager(TypeOracle types,
MortalLogger logger)
|
|
| Method Summary | |
|---|---|
FieldWriter |
lookup(java.lang.String fieldName)
|
void |
pop()
Remove the field at the top of the parsedFieldStack. |
void |
push(FieldWriter fieldWriter)
|
FieldWriter |
registerField(JClassType fieldType,
java.lang.String fieldName)
Used to declare fields of an existing type. |
FieldWriter |
registerFieldForGeneratedCssResource(ImplicitCssResource cssResource)
Used to declare fields that will hold generated instances generated CssResource interfaces. |
FieldWriter |
registerFieldOfGeneratedType(JClassType assignableType,
java.lang.String typePackage,
java.lang.String typeName,
java.lang.String fieldName)
Used to declare fields of a type (other than CssResource) that is to be generated. |
void |
registerFieldReference(java.lang.String fieldReferenceString,
JType type)
Called to register a {field.reference} encountered during
parsing, to be validated against the type oracle once parsing is complete. |
void |
validate()
To be called after parsing is complete. |
void |
writeGwtFieldsDeclaration(IndentedWriter writer,
java.lang.String ownerTypeName)
Writes all stored gwt fields. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FieldManager(TypeOracle types,
MortalLogger logger)
| Method Detail |
|---|
public FieldWriter lookup(java.lang.String fieldName)
fieldName - the name of the FieldWriter to find
FieldWriter instance indexed by fieldName or
null in case fieldName is not foundpublic void pop()
parsedFieldStack.
public void push(FieldWriter fieldWriter)
fieldWriter - the field to push on the top of the
parsedFieldStack
public FieldWriter registerField(JClassType fieldType,
java.lang.String fieldName)
throws UnableToCompleteException
registerFieldOfGeneratedType(JClassType, java.lang.String, java.lang.String, java.lang.String).
When making a field we peek at the parsedFieldStack to make sure
that the field that holds the widget currently being parsed will depended
upon the field being declared. This ensures, for example, that dom id
fields (see #declareDomIdHolder()) used by an HTMLPanel will be
declared before it is.
fieldType - the type of the new fieldfieldName - the name of the new field
FieldWriter instance
UnableToCompleteException - on duplicate name
public FieldWriter registerFieldForGeneratedCssResource(ImplicitCssResource cssResource)
throws UnableToCompleteException
registerField(JClassType, java.lang.String). For other generated types, use
registerFieldOfGeneratedType(JClassType, java.lang.String, java.lang.String, java.lang.String)
registerFieldForGeneratedCssResource(com.google.gwt.uibinder.rebind.model.ImplicitCssResource).
When making a field we peek at the parsedFieldStack to make sure
that the field that holds the widget currently being parsed will depended
upon the field being declared. This ensures, for example, that dom id
fields (see #declareDomIdHolder()) used by an HTMLPanel will be
declared before it is.
FieldWriter instance
UnableToCompleteException - on duplicate name
public FieldWriter registerFieldOfGeneratedType(JClassType assignableType,
java.lang.String typePackage,
java.lang.String typeName,
java.lang.String fieldName)
throws UnableToCompleteException
registerField(JClassType, java.lang.String). For generated CssResources, see
registerFieldForGeneratedCssResource(com.google.gwt.uibinder.rebind.model.ImplicitCssResource).
When making a field we peek at the parsedFieldStack to make sure
that the field that holds the widget currently being parsed will depended
upon the field being declared. This ensures, for example, that dom id
fields (see #declareDomIdHolder()) used by an HTMLPanel will be
declared before it is.
assignableType - class or interface extened or implemented by this
typetypeName - the full qualified name for the class associated with the
fieldfieldName - the name of the field
FieldWriter instance
UnableToCompleteException - on duplicate name
public void registerFieldReference(java.lang.String fieldReferenceString,
JType type)
{field.reference} encountered during
parsing, to be validated against the type oracle once parsing is complete.
UnableToCompleteException
public void validate()
throws UnableToCompleteException
{field.reference}s and checks they refer to existing types,
and have appropriate return types.
UnableToCompleteException - if any {field.references}
can't be resolved
public void writeGwtFieldsDeclaration(IndentedWriter writer,
java.lang.String ownerTypeName)
throws UnableToCompleteException
writer - the writer to outputownerTypeName - the name of the class being processed
UnableToCompleteException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||