Class ParametersFactory
- java.lang.Object
-
- org.jboss.weld.environment.se.beans.ParametersFactory
-
@Vetoed @ApplicationScoped public class ParametersFactory extends Object
The simple bean that will hold the command line arguments and make them available by injection (using the @Parameters binding). It's initialised by the StartMain class before your main app is initialised.- Author:
- Peter Royle
-
-
Constructor Summary
Constructors Constructor Description ParametersFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<String>
getArgs()
Producer method for the injectable command line args.String[]
getArgsAsArray()
Producer method for the injectable command line args.void
setArgs(String[] args)
StartMain passes in the command line args here.
-
-
-
Method Detail
-
getArgs
@Produces public List<String> getArgs()
Producer method for the injectable command line args.- Returns:
- The command line arguments.
-
getArgsAsArray
@Produces public String[] getArgsAsArray()
Producer method for the injectable command line args.- Returns:
- The command line arguments.
-
setArgs
public void setArgs(String[] args)
StartMain passes in the command line args here.- Parameters:
args
- The command line arguments. If null is given then an empty array will be used instead.
-
-