Package org.cef.callback
Interface CefCommandLine
-
public interface CefCommandLineClass used to create and/or parse command line arguments. Arguments with '--', '-' and, on Windows, '/' prefixes are considered switches. Switches will always precede any arguments without switch prefixes. Switches can optionally have a value specified using the '=' delimiter (e.g. "-switch=value"). An argument of "--" will terminate switch parsing with all subsequent tokens, regardless of prefix, being interpreted as non-switch arguments. Switch names are considered case-insensitive.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidappendArgument(java.lang.String argument)Add an argument to the end of the command line.voidappendSwitch(java.lang.String name)Add a switch with an empty value to the end of the command line.voidappendSwitchWithValue(java.lang.String name, java.lang.String value)Add a switch with the specified value to the end of the command line.java.util.Vector<java.lang.String>getArguments()Get the remaining command line arguments.java.lang.StringgetProgram()Get the program part of the command line string (the first item).java.util.Map<java.lang.String,java.lang.String>getSwitches()Returns the map of switch names and values.java.lang.StringgetSwitchValue(java.lang.String name)Returns the value associated with the given switch.booleanhasArguments()Tests if there are remaining command line arguments.booleanhasSwitch(java.lang.String name)Checks if the command line has a specific switches.booleanhasSwitches()Checks if the command line has switches.voidreset()Reset the command-line switches and arguments but leave the program component unchanged.voidsetProgram(java.lang.String program)Set the program part of the command line string (the first item).
-
-
-
Method Detail
-
reset
void reset()
Reset the command-line switches and arguments but leave the program component unchanged.
-
getProgram
java.lang.String getProgram()
Get the program part of the command line string (the first item).
-
setProgram
void setProgram(java.lang.String program)
Set the program part of the command line string (the first item).- Parameters:
program- Name of the program.
-
hasSwitches
boolean hasSwitches()
Checks if the command line has switches.- Returns:
- true if the command line has switches.
-
hasSwitch
boolean hasSwitch(java.lang.String name)
Checks if the command line has a specific switches.- Parameters:
name- A switch name to test for.- Returns:
- true if the command line contains the given switch.
-
getSwitchValue
java.lang.String getSwitchValue(java.lang.String name)
Returns the value associated with the given switch. If the switch has no value or isn't present this method returns the empty string.- Parameters:
name- the name of the switch.- Returns:
- the value of the switch.
-
getSwitches
java.util.Map<java.lang.String,java.lang.String> getSwitches()
Returns the map of switch names and values. If a switch has no value an empty string is returned.- Returns:
- Map of switches and each value.
-
appendSwitch
void appendSwitch(java.lang.String name)
Add a switch with an empty value to the end of the command line.- Parameters:
name- name of the switch.
-
appendSwitchWithValue
void appendSwitchWithValue(java.lang.String name, java.lang.String value)Add a switch with the specified value to the end of the command line.- Parameters:
name- name of the switch.value- value for the switch.
-
hasArguments
boolean hasArguments()
Tests if there are remaining command line arguments.- Returns:
- True if there are remaining command line arguments.
-
getArguments
java.util.Vector<java.lang.String> getArguments()
Get the remaining command line arguments.- Returns:
- Vector of command line arguments.
-
appendArgument
void appendArgument(java.lang.String argument)
Add an argument to the end of the command line.- Parameters:
argument- name of the argument.
-
-