public class NBootCmdLine extends Object
NCmdLine args=new DefaultNCmdLine(Arrays.asList("--!deleteLog","--deploy","/deploy/path","--deploy=/other-deploy/path","some-param"));
Argument a;
while (args.hasNext()) {
if ((a = args.nextBoolean("--deleteLog").orNull()) != null) {
deleteLog = a.getBooleanValue().get(session);
} else if ((a = args.nextString("--deploy").orNull()) != null) {
apps.add(a.getStringValue().get(session));
} else if ((a = args.next()) != null) {
name = a.getString();
} else {
args.throwUnexpectedArgument();
}
}
| Modifier and Type | Field and Description |
|---|---|
protected LinkedList<String> |
args |
protected String |
commandName |
protected boolean |
expandArgumentsFile |
protected boolean |
expandSimpleOptions |
protected List<NBootArg> |
lookahead |
protected Set<String> |
specialSimpleOptions |
| Constructor and Description |
|---|
NBootCmdLine() |
NBootCmdLine(List<String> args) |
NBootCmdLine(String[] args) |
protected LinkedList<String> args
protected boolean expandSimpleOptions
protected boolean expandArgumentsFile
protected String commandName
public NBootCmdLine()
public NBootCmdLine(String[] args)
public NBootCmdLine unregisterSpecialSimpleOption(String option)
public String[] getSpecialSimpleOptions()
public NBootCmdLine registerSpecialSimpleOption(String option)
public boolean isSpecialSimpleOption(String option)
public int getWordIndex()
public String getCommandName()
public NBootCmdLine setCommandName(String commandName)
public boolean isExpandSimpleOptions()
public NBootCmdLine setExpandSimpleOptions(boolean expand)
public NBootCmdLine throwUnexpectedArgument(NBootMsg errorMessage)
public NBootCmdLine throwMissingArgument()
public NBootCmdLine throwMissingArgument(String argumentName)
public NBootCmdLine throwMissingArgument(NBootMsg errorMessage)
public NBootCmdLine throwUnexpectedArgument()
public NBootCmdLine pushBack(NBootArg arg)
public NBootArg next()
public String nextString()
public boolean isNextOption()
public boolean isNextNonOption()
public NBootArg peek()
public boolean hasNext()
public boolean hasNextOption()
public boolean hasNextNonOption()
public NBootArg nextEntry()
public NBootArg nextFlag()
public NBootArg nextNonOption()
public int skipAll()
public int skip()
public int skip(int count)
public boolean accept(String... values)
public boolean accept(int index,
String... values)
public NBootArg get(int index)
public boolean contains(String name)
public int indexOf(String name)
public int length()
public boolean isEmpty()
public String[] toStringArray()
public NBootArg[] toArgumentArray()
public boolean isOption(int index)
public boolean isNonOption(int index)
public NBootCmdLine setArguments(List<String> arguments)
public NBootCmdLine setArguments(String[] arguments)
public void throwError(NBootMsg message)
public NBootArg next(boolean expandSimpleOptions)
public NBootCmdLine copy()
public NBootCmdLine add(String argument)
public NBootCmdLine addAll(List<String> arguments)
public boolean isBlank()
public NBootCmdLine pushBack(NBootArg... args)
public NBootCmdLine pushBack(String... args)
public NBootCmdLine append(String... args)
Copyright © 2026 vpc open source initiative. All rights reserved.