java.lang.Object
org.autogui.base.mapping.GuiRepresentation.GuiReprNone
- All Implemented Interfaces:
GuiRepresentation
- Enclosing interface:
GuiRepresentation
the empty implementation of the representation
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.autogui.base.mapping.GuiRepresentation
GuiRepresentation.GuiReprNone
-
Field Summary
Fields inherited from interface org.autogui.base.mapping.GuiRepresentation
NONE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
checkAndUpdateSource
(GuiMappingContext context) invoke the associated method and check the returned value whether it is updated or not.fromJson
(GuiMappingContext context, Object target, Object json) create a new value object from the JSON with treating the target as an old value, or update the target with the JSON contents.boolean
match
(GuiMappingContext context) match the representation with the typeElement of the context, and if succeeded, it sets this representation to the context, and it might create sub-contexts for recursive matches *toJson
(GuiMappingContext context, Object source) convert the source into JSON formattoString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.autogui.base.mapping.GuiRepresentation
continueCheckAndUpdateSourceForChildren, fromHumanReadableString, fromJsonWithNamed, isJsonSetter, isTaskRunnerUsedFor, matchAndSetNotifiersAsInit, setNotifiersTree, shutdown, toHumanReadableString, toJsonWithNamed, toStringHeader
-
Constructor Details
-
GuiReprNone
public GuiReprNone()
-
-
Method Details
-
match
Description copied from interface:GuiRepresentation
match the representation with the typeElement of the context, and if succeeded, it sets this representation to the context, and it might create sub-contexts for recursive matches *- Specified by:
match
in interfaceGuiRepresentation
- Parameters:
context
- the context of the repr.- Returns:
- the matching result
-
checkAndUpdateSource
Description copied from interface:GuiRepresentation
invoke the associated method and check the returned value whether it is updated or not. if updated, set the source of context to the value. This is non-recursive operation;GuiMappingContext
recursively calls this method. The source of parent is already updated by the order of the calls.- Specified by:
checkAndUpdateSource
in interfaceGuiRepresentation
- Parameters:
context
- the context of the repr.- Returns:
- the representation is updated or not
-
toJson
Description copied from interface:GuiRepresentation
convert the source into JSON format -
fromJson
Description copied from interface:GuiRepresentation
create a new value object from the JSON with treating the target as an old value, or update the target with the JSON contents. the behavior can be varied by each representation, confirmed byGuiRepresentation.isJsonSetter()
.- Specified by:
fromJson
in interfaceGuiRepresentation
- Parameters:
context
- a context holds the representationtarget
- the target object or nulljson
- JSON objects representing the targetString
,Number
,Boolean
,List
,Map
or null- Returns:
- created object from the json, target if provided, or null.
-
toString
-