public final class CliHandlerProxy extends CliHandlerBase
Destroyable.Util
Constructor and Description |
---|
CliHandlerProxy(CommanderClassMetaInfo classMetaInfo,
CommandMethodMetaInfo metaInfo,
App app) |
Modifier and Type | Method and Description |
---|---|
boolean |
appliedIn(Act.Mode mode)
Check if this handler applied in a specific
Act.Mode |
CommanderClassMetaInfo |
classMetaInfo() |
org.osgl.Osgl.T2<java.lang.String,java.lang.String> |
commandLine()
Returns the command line information that is used to display the command in help.
|
boolean |
equals(java.lang.Object obj) |
void |
handle(CliContext context)
Invoke handler upon a cli context
|
int |
hashCode() |
CommandMethodMetaInfo |
methodMetaInfo() |
java.util.List<org.osgl.Osgl.T2<java.lang.String,java.lang.String>> |
options()
Returns a list of options information to be displayed in help of this command.
|
protected void |
releaseResources() |
java.lang.String |
toString() |
apply, destroy, isDestroyed, scope, summary
public CliHandlerProxy(CommanderClassMetaInfo classMetaInfo, CommandMethodMetaInfo metaInfo, App app)
protected void releaseResources()
releaseResources
in class CliHandlerBase
public CommandMethodMetaInfo methodMetaInfo()
public CommanderClassMetaInfo classMetaInfo()
public boolean appliedIn(Act.Mode mode)
CliHandler
Check if this handler applied in a specific Act.Mode
appliedIn
in interface CliHandler
appliedIn
in class CliHandlerBase
true
if this handler applied in the mode, or false
otherwisepublic void handle(CliContext context)
CliHandler
Invoke handler upon a cli context
context
- the cli contextpublic org.osgl.Osgl.T2<java.lang.String,java.lang.String> commandLine()
CliHandler
Returns the command line information that is used to display the command in help. For example the Help
command is
help [options] [command] show help message
Help
command should return $.T2(“help [options] [command]”, “show help message”)
public java.util.List<org.osgl.Osgl.T2<java.lang.String,java.lang.String>> options()
CliHandler
Returns a list of options information to be displayed in help of this command. E.g. the options of Help
command is
-s –system list system commands
-a –app list app commands
Help
should return a list of $.T2(“-s –system”, “list system commands”)
$.T2(“-a –app”, “list application commands”)
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Copyright © 2014–2017 ActFramework. All rights reserved.