protected static class AbstractClientBundleGenerator.FieldsImpl extends Object implements ClientBundleFields
Modifier | Constructor and Description |
---|---|
protected |
AbstractClientBundleGenerator.FieldsImpl() |
Modifier and Type | Method and Description |
---|---|
String |
define(com.google.gwt.core.ext.typeinfo.JType type,
String name)
Adds a field to the bundle.
|
String |
define(com.google.gwt.core.ext.typeinfo.JType type,
String name,
String initializer,
boolean isStatic,
boolean isFinal)
Adds a field to the bundle.
|
void |
setInitializer(String ident,
String initializer)
This can be called to reset the initializer expression on an
already-defined field.
|
protected AbstractClientBundleGenerator.FieldsImpl()
public String define(com.google.gwt.core.ext.typeinfo.JType type, String name)
ClientBundleFields
defineField(type, name, null, true, false)
.define
in interface ClientBundleFields
type
- the declared type of the fieldname
- a Java identifier to be used as the basis for the name of the
fieldpublic String define(com.google.gwt.core.ext.typeinfo.JType type, String name, String initializer, boolean isStatic, boolean isFinal)
ClientBundleFields
define
in interface ClientBundleFields
type
- the declared type of the fieldname
- a Java identifier to be used as the basis for the name of the
fieldinitializer
- a Java expression that will be used as the field's
initializer, or null
if no initialization expression
is desiredisStatic
- if true
the field will be declared to be
staticisFinal
- if true
the fields will be declared as finalpublic void setInitializer(String ident, String initializer)
ident
- an identifier previously returned by define(com.google.gwt.core.ext.typeinfo.JType, java.lang.String)
initializer
- a Java expression that will be used to initialize the
fieldCopyright © 2016. All rights reserved.