@groovy.transform.CompileStatic class GloopModel extends GloopObject implements GloopParent<GloopObject>
This is where a lot of the gloop magic happens, pay attention
Modifiers | Name | Description |
---|---|---|
class |
GloopModel.1 |
Fields inherited from class | Fields |
---|---|
class GloopObject |
DEFAULT_NAMESPACE |
Type | Name and description |
---|---|
boolean |
allowExtraProperties is this model an expando? |
java.util.LinkedList<GloopObject> |
gloopProperties |
java.lang.String |
inputType The type of UI element that should be used when entering this field |
java.lang.String |
reference What model in the gloop registry does this reference? |
java.lang.String |
reference |
GloopModel |
referenceModel |
GloopResolver |
resolver |
java.lang.Object |
value |
Constructor and description |
---|
GloopModel
() |
GloopModel
(boolean allowExtraProperties) |
GloopModel
(java.lang.String name) |
GloopModel
(java.lang.String name, boolean allowExtraProperties) |
GloopModel
(java.lang.String name, java.util.LinkedList<GloopObject> gloopProperties) |
GloopModel
(java.lang.String name, java.util.LinkedList<GloopObject> gloopProperties, boolean allowExtraProperties) |
Type Params | Return Type | Name and description |
---|---|---|
|
void |
addChild(GloopObject child, int index) |
|
void |
addChildren(java.util.List<GloopObject> children) |
|
void |
addProperties(java.util.List<GloopObject> gloopProperties) adds the given properties to this model, allowExtraProperties isn't checked. |
|
void |
addProperty(GloopObject newProperty, int index) used to dynamically add a property to a model |
|
boolean |
allowsChildren() |
|
GloopModel |
and(GloopModel andModel) method to allow overloading of the & operator will return a new model with non-cloned properties contained in this model and the given model parameter, but only if both models have a property with the same NAME if both have a property with the same name, this model will take precedence over the model parameter http://groovy-lang.org/operators.html#Operator-Overloading @return |
|
java.lang.String |
asJson(boolean includeNulls, boolean includeRoot) |
|
GloopModel |
asReference(java.lang.String reference, GloopResolver resolver) |
|
java.util.List<GloopObject> |
children() |
|
void |
clear() |
|
java.lang.Object |
clone() |
|
GloopModel |
cloneWithReference() |
|
protected java.lang.Object |
convertValue(java.lang.Object other) This is where most of the work happens. |
|
void |
forceReplace(java.lang.String key, GloopObject object) |
|
java.lang.Object |
get(java.lang.Object key) used to get a property value, unless the property name ends with $Gloop, then the gloop object is returned |
|
boolean |
getAllowExtraProperties() |
|
java.lang.String |
getFilename() |
|
java.lang.String |
getGloopDocString(int indent) |
|
java.util.LinkedList<GloopObject> |
getGloopProperties(boolean getReferenceProperties) returns a CLONED list of the properties of this model @return |
<T extends GloopObject> |
T |
getGloopProperty(java.lang.String propertyName) |
|
static java.lang.String |
getNameFromReference(java.lang.String reference) |
|
GloopObject |
getPropertyWithAlias(java.lang.String alias) |
|
GloopModel |
getReferenceModel() |
|
java.util.List<GloopObject> |
getReferenceProperties() |
|
java.lang.String |
getType() length of model < length of gloopModel |
|
java.lang.Class |
getTypeClass() |
|
java.lang.Object |
getValue() if any of our properties have a value that isn't null, then we're not null either. |
|
boolean |
hasProperty(java.lang.String name) checks whether the model has a property with the given name |
|
boolean |
isNullValue() |
|
boolean |
isPlainReferenceModel() |
|
boolean |
isReference() |
|
boolean |
isReferenceModelLoaded() |
|
java.util.Set<java.lang.String> |
keySet() |
|
GloopModel |
or(GloopModel orModel) method to allow overloading of the | operator will return a new model with non-cloned properties contained in this model and the given model parameter if both have a property with the same name, this model will take precedence over the model parameter http://groovy-lang.org/operators.html#Operator-Overloading @return |
|
java.lang.Object |
parseVal(java.lang.Object val) |
|
java.lang.Object |
put(java.lang.String key, java.lang.Object value) |
|
java.lang.Object |
putWithAlias(java.lang.String alias, java.lang.Object val) |
|
boolean |
referenceExists() |
|
java.lang.Object |
remove(java.lang.Object key) |
|
void |
remove(int index) only delete child if it's not from the referenceModel |
|
void |
removeChild(GloopObject child) |
|
GloopModel |
resolveModel(GloopResolver resolver) |
|
GloopModel |
resolveModel(java.util.Map resolvedModels, GloopResolver resolver) |
|
void |
setArray(boolean array) Models effectively are themselves the 'value' when they're not an array. |
|
void |
setDefaultValue(java.lang.Object defaultValue) |
|
void |
setDefaultValue(java.lang.Object defaultValue, boolean checkReference) |
|
void |
setGloopProperties(java.lang.Object gloopProperties) |
|
void |
setParent(java.lang.Object parent) |
|
void |
setReference(java.lang.String reference) |
|
void |
setReferenceModel(GloopModel referenceModel) |
|
void |
setResolver(GloopResolver resolver) |
|
void |
setValue(java.lang.Object value) |
|
java.lang.String |
toString() |
|
java.lang.String |
treeString() |
|
java.lang.String |
treeSuffix() |
|
static GloopModel |
unmarshall(java.lang.String json, GloopResolver resolver) |
|
static GloopModel |
unmarshall(java.io.File file, GloopResolver resolver) |
|
static GloopModel |
unmarshall(java.io.InputStream json, GloopResolver resolver) |
|
static GloopModel |
unmarshall(java.io.Reader json, GloopResolver resolver) |
|
static GloopModel |
unmarshall(java.net.URL url, GloopResolver resolver) |
|
protected void |
validateValue() |
|
GloopModel |
xor(GloopModel xorModel) method to allow overloading of the ^ operator will return a new model with non-cloned properties contained in this model and not in the given model parameter, and vice versa http://groovy-lang.org/operators.html#Operator-Overloading @return |
Methods inherited from class | Name |
---|---|
class GloopObject |
asJson, asJson, asJson, asType, asXml, asXml, asYaml, asYaml, asYaml, call, clone, clone, commentsString, convertValue, each, eachWithIndex, escapeGloopDocParameter, find, findIndexOf, fromGloopDoc, fromJson, fromJson, fromJson, fromXml, fromXml, fromXml, fromYaml, fromYaml, fromYaml, getAlias, getAt, getAt, getFilename, getFormattedValue, getGloopDocString, getGloopDocType, getNamespaceUri, getPathName, getPathName, getRawDefaultValue, getRawValue, getType, getTypeClass, getValue, getValue, iconName, isEmpty, isNullValue, iterator, leftShift, marshall, minus, parseVal, plus, putAt, rightShift, setArray, setName, setNamespaceUri, setTypeClass, setValue, size, throwClassCastException, toString, toolTipText, treeString, treeSuffix, validate, validateValue |
is this model an expando?
The type of UI element that should be used when entering this field
What model in the gloop registry does this reference?
adds the given properties to this model, allowExtraProperties isn't checked. This method should only be used to set up a model
used to dynamically add a property to a model
method to allow overloading of the & operator will return a new model with non-cloned properties contained in this model and the given model parameter, but only if both models have a property with the same NAME if both have a property with the same name, this model will take precedence over the model parameter http://groovy-lang.org/operators.html#Operator-Overloading @return
This is where most of the work happens. The get/set/put/parse methods all revert to this when deciding whether to accept a given value or not. The value returned from this method is what's used when putting/setting a value. You can't clone the given value and use the clone because the calling methods sometimes populate the value after adding to the model. If you clone the value and add the clone, then the properties set afterwards won't be reflected here.
used to get a property value, unless the property name ends with $Gloop, then the gloop object is returned @return
returns a CLONED list of the properties of this model @return
length of model < length of gloopModel
if any of our properties have a value that isn't null, then we're not null either. Otherwise we're null @return
checks whether the model has a property with the given name @return
name
- The name of the property of interestmethod to allow overloading of the | operator will return a new model with non-cloned properties contained in this model and the given model parameter if both have a property with the same name, this model will take precedence over the model parameter http://groovy-lang.org/operators.html#Operator-Overloading @return
only delete child if it's not from the referenceModel
Models effectively are themselves the 'value' when they're not an array. When they are, then the value will be a list of cloned models whose array property will be false this code ensures all that happens
method to allow overloading of the ^ operator will return a new model with non-cloned properties contained in this model and not in the given model parameter, and vice versa http://groovy-lang.org/operators.html#Operator-Overloading @return
Groovy Documentation