Package org.springframework.beans

Examples of org.springframework.beans.PropertyAccessor


   */
  public static Resource initResource(Resource aResource, ApplicationContext aApplicationContext) {
    AutowireCapableBeanFactory beanFactory = aApplicationContext.getAutowireCapableBeanFactory();

    if (aResource instanceof PrimitiveAnalysisEngine_impl) {
      PropertyAccessor pa = PropertyAccessorFactory.forDirectFieldAccess(aResource);

      // Access the actual AnalysisComponent and initialize it
      AnalysisComponent analysisComponent = (AnalysisComponent) pa
              .getPropertyValue("mAnalysisComponent");
      initializeBean(beanFactory, analysisComponent, aResource.getMetaData().getName());
      pa.setPropertyValue("mAnalysisComponent", analysisComponent);

      return aResource;
    } else {
      return (Resource) beanFactory.initializeBean(aResource, aResource.getMetaData().getName());
    }
View Full Code Here

TOP

Related Classes of org.springframework.beans.PropertyAccessor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.