|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectuk.co.grahamcox.spring.cli.options.CommandLineBeanPostProcessor
public class CommandLineBeanPostProcessor
Bean post processor for creating the CommandLine object properly and for automatically wiring command line options into created beans
| Constructor Summary | |
|---|---|
CommandLineBeanPostProcessor()
|
|
| Method Summary | |
|---|---|
Object |
postProcessAfterInitialization(Object bean,
String name)
Do nothing |
Object |
postProcessBeforeInitialization(Object bean,
String name)
This now does two things. |
void |
setApplicationContext(org.springframework.context.ApplicationContext context)
Set the Application Context |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandLineBeanPostProcessor()
| Method Detail |
|---|
public void setApplicationContext(org.springframework.context.ApplicationContext context)
throws org.springframework.beans.BeansException
setApplicationContext in interface org.springframework.context.ApplicationContextAwarecontext - the context
org.springframework.beans.BeansException
public Object postProcessAfterInitialization(Object bean,
String name)
throws org.springframework.beans.BeansException
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansException
public Object postProcessBeforeInitialization(Object bean,
String name)
throws org.springframework.beans.BeansException
arguments and commandLineParser objects are bound, and the bean is a CommandLine object
then try to actually instantiate the command line from the Options object in the context, using the bound arguments and parser
If this isn't the case and the bean has at least one method with the WireOption annotation then attempt to wire into that
setter the value from the named command line option
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessororg.springframework.beans.BeansException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||