Class ArgsVar
The format for this var is
The argument can be either a positional index (e.g.
This variable resolver requires that the command-line arguments be made available through any of the following:
"sun.java.command" system property."juneau.args" system property.- The instance was created via
create(Supplier).
Example:
Since this is a SimpleVar, any variables contained in the result will be recursively resolved.
Likewise, if the arguments contain any variables, those will be resolved before they are passed to this var.
See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ArgsVarprotected booleanisStable()Process command-line args are immutable for the lifetime of the JVM, so the no-arg constructor opts in to compile-time stable-value folding.resolve(VarResolverSession session, String key) The interface that needs to be implemented for subclasses ofSimpleVar.Methods inherited from class org.apache.juneau.commons.svl.DefaultingVar
doResolveMethods inherited from class org.apache.juneau.commons.svl.Var
allowNested, allowRecurse, canResolve, getName
-
Field Details
-
NAME
The name of this variable.- See Also:
-
-
Constructor Details
-
ArgsVar
public ArgsVar()Constructor.
-
-
Method Details
-
create
-
resolve
Description copied from class:VarThe interface that needs to be implemented for subclasses ofSimpleVar. -
isStable
Process command-line args are immutable for the lifetime of the JVM, so the no-arg constructor opts in to compile-time stable-value folding.The
create(Supplier)variant returnsfalsesince the supplier may return updated args between resolves.- Overrides:
isStablein classVar- Returns:
truefor the default no-arg constructor;falsefor thecreate(Supplier)variant.
-