uk.co.grahamcox.spring.cli.options
Class OptionsBeanPostProcessor

java.lang.Object
  extended by uk.co.grahamcox.spring.cli.options.OptionsBeanPostProcessor
All Implemented Interfaces:
org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.context.ApplicationContextAware

public class OptionsBeanPostProcessor
extends Object
implements org.springframework.beans.factory.config.BeanPostProcessor, org.springframework.context.ApplicationContextAware

Bean post processor for populating the Options object with all the Option objects in the context

Author:
graham

Constructor Summary
OptionsBeanPostProcessor()
           
 
Method Summary
 Object postProcessAfterInitialization(Object bean, String name)
          Process the Options objects that are created to add any Option objects in the context to them
 Object postProcessBeforeInitialization(Object bean, String name)
          Do nothing
 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

OptionsBeanPostProcessor

public OptionsBeanPostProcessor()
Method Detail

setApplicationContext

public void setApplicationContext(org.springframework.context.ApplicationContext context)
                           throws org.springframework.beans.BeansException
Set the Application Context

Specified by:
setApplicationContext in interface org.springframework.context.ApplicationContextAware
Parameters:
context - the context
Throws:
org.springframework.beans.BeansException

postProcessAfterInitialization

public Object postProcessAfterInitialization(Object bean,
                                             String name)
                                      throws org.springframework.beans.BeansException
Process the Options objects that are created to add any Option objects in the context to them

Specified by:
postProcessAfterInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Parameters:
bean - The bean to process
name - The name of the bean
Returns:
The processed bean
Throws:
org.springframework.beans.BeansException

postProcessBeforeInitialization

public Object postProcessBeforeInitialization(Object bean,
                                              String name)
                                       throws org.springframework.beans.BeansException
Do nothing

Specified by:
postProcessBeforeInitialization in interface org.springframework.beans.factory.config.BeanPostProcessor
Throws:
org.springframework.beans.BeansException


Copyright © 2011. All Rights Reserved.