Interface Editor<T>
- Type Parameters:
T- the type of the exported object
- All Superinterfaces:
EditorAction
- All Known Implementing Classes:
ListEditor,ValueEditor
The Editor
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final EditorStringThe string of the message when the actor executes an invalid actionstatic final EditorStringThe string of the usage of the editor -
Method Summary
Modifier and TypeMethodDescriptionactions()The map of all available actions of the editordefault Collection<String> complete(EditorActor actor, String[] args) Get the completion suggestions, given the argumentsdefault EditorStringGet the description of the actiondefault voidexecute(EditorActor actor, String[] args) Execute the actionexport(EditorActor actor) Export the object from the editorvoidMigrate from the objectvoidreset()Reset the editorstatus()Get an object representing the status of the editordefault EditorStringusage()Get the usage of the action
-
Field Details
-
USAGE
The string of the usage of the editor -
INVALID_ACTION
The string of the message when the actor executes an invalid action
-
-
Method Details
-
actions
Map<String,EditorAction> actions()The map of all available actions of the editor- Returns:
- the action map
-
reset
void reset()Reset the editor -
status
Object status()Get an object representing the status of the editor- Returns:
- the status
-
export
Export the object from the editor- Parameters:
actor- the actor- Returns:
- the object if it's exported successfully, otherwise empty
-
migrate
Migrate from the object- Parameters:
data- the object
-
description
Description copied from interface:EditorActionGet the description of the action- Specified by:
descriptionin interfaceEditorAction- Returns:
- the description
-
usage
Description copied from interface:EditorActionGet the usage of the action- Specified by:
usagein interfaceEditorAction- Returns:
- the usage
-
complete
Description copied from interface:EditorActionGet the completion suggestions, given the arguments- Specified by:
completein interfaceEditorAction- Parameters:
actor- the actionargs- the argument- Returns:
- the suggestions
-
execute
Description copied from interface:EditorActionExecute the action- Specified by:
executein interfaceEditorAction- Parameters:
actor- the actorargs- the arguments
-