@Singleton public class Main extends Object
main(String[]),
main(SeContainerInitializer, Consumer, String[]),
SeContainerInitializer.initialize()| Modifier | Constructor and Description |
|---|---|
protected |
Main()
Creates a new
Main. |
| Modifier and Type | Method and Description |
|---|---|
static void |
main(SeContainerInitializer containerInitializer,
Consumer<? super SeContainer> consumer,
String[] args)
Initializes a
new
SeContainer, calls the supplied consumer parameter value with it
(if the supplied consumer parameter value is non-null), and then closes it. |
static void |
main(SeContainerInitializer containerInitializer,
String[] args)
|
static void |
main(String[] args)
|
public static final void main(String[] args)
SeContainer and then closes it.
This method calls the main(SeContainerInitializer,
Consumer, String[]) method with the return value of the SeContainerInitializer.newInstance() method, null, and
the supplied args parameter value.
args - command-line arguments; may be nullmain(SeContainerInitializer, Consumer, String[])public static final void main(SeContainerInitializer containerInitializer, String[] args)
SeContainer and then closes it.
This method calls the main(SeContainerInitializer,
Consumer, String[]) method with the supplied containerInitializer parameter value, null, and the
supplied args parameter value.
containerInitializer - the SeContainerInitializer to
use to initialize the SeContainer; may be null in
which case the return value of SeContainerInitializer.newInstance() will be used insteadargs - command-line arguments; may be nullmain(SeContainerInitializer, Consumer, String[])public static final void main(SeContainerInitializer containerInitializer, Consumer<? super SeContainer> consumer, String[] args)
SeContainer, calls the supplied consumer parameter value with it
(if the supplied consumer parameter value is non-null), and then closes it.
This method has a deliberate side effect of making the args parameter value available in the CDI container in Singleton scope with a qualifier of @Named("commandLineArguments"). It also causes an
instance of this class to be created by the CDI container in
Singleton scope.
containerInitializer - the SeContainerInitializer to
use to initialize the SeContainer; may be null in
which case the return value of SeContainerInitializer.newInstance() will be used instead. This
SeContainerInitializer instance will have its SeContainerInitializer.addBeanClasses(Class...) method called
with Main.class as its only argument.consumer - a Consumer whose Consumer.accept(Object) method will be called with an SeContainer; may be null; rarely neededargs - command-line arguments; may be nullSeContainerInitializer.newInstance(),
SeContainerInitializer.initialize(),
SeContainer.close()Copyright © 2017–2020, microBean™. All rights reserved.