public class BindingProperty extends Property
Constructor and Description |
---|
BindingProperty(String name) |
Modifier and Type | Method and Description |
---|---|
void |
addCollapsedValues(String... values)
Add an equivalence set of property values.
|
void |
addDefinedValue(Condition condition,
String definedValue) |
void |
addFallbackValue(String value,
String fallbackValue)
Adds fall back value to given property name.
|
boolean |
equals(Object object) |
String[] |
getAllowedValues(Condition condition)
Returns the set of values defined in the module file.
|
List<SortedSet<String>> |
getCollapsedValuesSets() |
com.google.gwt.thirdparty.guava.common.collect.ImmutableMap<Condition,SortedSet<String>> |
getConditionalValues()
Returns a map containing the generated values for each condition, in the order
they were added to the module files.
|
String |
getConstrainedValue()
If the BindingProperty has exactly one generated value across all conditions and
permutations, return that value otherwise return
null . |
String[] |
getDefinedValues()
Returns the set of defined values in sorted order.
|
String |
getFallback()
Returns the fallback value for this property, or the empty string if none.
|
Map<String,? extends List<? extends Set<String>>> |
getFallbackValuesMap()
Returns the map of values to fall back values.
|
String |
getFirstAllowedValue()
Returns the first value from the list of defined values that is that is also allowed.
|
String |
getFirstGeneratedValue()
Returns the first value from the list of defined values that is actually generated.
|
String[] |
getGeneratedValues(Condition condition)
Returns the set of values for which the GWT compiler must generate permutations.
|
PropertyProvider |
getProvider() |
Class<? extends PropertyProviderGenerator> |
getProviderGenerator() |
Set<String> |
getRequiredProperties() |
ConditionAll |
getRootCondition() |
int |
hashCode() |
boolean |
isAllowedValue(String value)
Returns true if the supplied value is used based on the module file.
|
boolean |
isDefinedValue(String value)
Returns
true if the value was previously provided to
addDefinedValue(Condition,String) . |
boolean |
isDerived()
Returns
true if the value of this BindingProperty is always
derived from other BindingProperties. |
boolean |
isGeneratedValue(String value)
Returns true if the supplied value will be used during code generation.
|
void |
resetGeneratedValues()
Undo any value restrictions that have been put in place specifically on the set of values used
for code generation as opposed to being present in the actual module definition.
|
void |
setFallback(String token) |
void |
setProvider(PropertyProvider provider) |
void |
setProviderGenerator(Class<? extends PropertyProviderGenerator> generator)
Set a provider generator for this property.
|
void |
setRootGeneratedValues(String... values)
Overrides the generated values for the root condition and clears the
generated values for other conditions.
|
void |
setValues(Condition bindingPropertyCondition,
String... values)
Replaces the allowed and generated values for a condition.
|
$isInstance
public static final String GLOB_STAR
public BindingProperty(String name)
public void addCollapsedValues(String... values)
public void addFallbackValue(String value, String fallbackValue)
value
- the property value.fallbackValue
- the fall back value for given property value.public String[] getAllowedValues(Condition condition)
getGeneratedValues(com.google.gwt.dev.cfg.Condition)
because this might be
overridden.)public String[] getGeneratedValues(Condition condition)
public com.google.gwt.thirdparty.guava.common.collect.ImmutableMap<Condition,SortedSet<String>> getConditionalValues()
public String getConstrainedValue()
null
.public String[] getDefinedValues()
public String getFallback()
public Map<String,? extends List<? extends Set<String>>> getFallbackValuesMap()
public String getFirstAllowedValue()
IllegalStateException
- if there is not at least one value that's both defined
and allowed.public String getFirstGeneratedValue()
IllegalStateException
- if there is not at least one value that's both defined
and generated.public PropertyProvider getProvider()
public Class<? extends PropertyProviderGenerator> getProviderGenerator()
public ConditionAll getRootCondition()
public boolean isDefinedValue(String value)
true
if the value was previously provided to
addDefinedValue(Condition,String)
.public boolean isAllowedValue(String value)
public boolean isGeneratedValue(String value)
public boolean isDerived()
true
if the value of this BindingProperty is always
derived from other BindingProperties. That is, for each Condition in the
BindingProperty, there is exactly one generated value.public void resetGeneratedValues()
public void setFallback(String token)
public void setProvider(PropertyProvider provider)
public void setProviderGenerator(Class<? extends PropertyProviderGenerator> generator)
public void setValues(Condition bindingPropertyCondition, String... values)
IllegalArgumentException
- if any value isn't currently defined.public void setRootGeneratedValues(String... values)
IllegalArgumentException
- if any value isn't currently defined.Copyright © 2018. All rights reserved.