001/** 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.xbean.spring.util; 018 019import org.springframework.beans.BeansException; 020import org.springframework.beans.MutablePropertyValues; 021import org.springframework.beans.PropertyValue; 022import org.springframework.beans.factory.config.BeanDefinition; 023import org.springframework.beans.factory.config.BeanDefinitionHolder; 024import org.springframework.beans.factory.config.ConfigurableListableBeanFactory; 025import org.springframework.beans.factory.config.ConstructorArgumentValues; 026import org.springframework.beans.factory.config.RuntimeBeanReference; 027 028import java.util.Collection; 029import java.util.Map; 030 031/** 032 * Walks a spring bean factory tree. 033 * @author Dain Sundstrom 034 * @version $Id$ 035 * @since 2.0 036 */ 037public interface SpringVisitor { 038 void visitBeanFactory(ConfigurableListableBeanFactory beanRegistry, Object data) throws BeansException; 039 040 void visitBeanDefinition(String beanName, BeanDefinition beanDefinition, Object data) throws BeansException; 041 042 void visitBeanDefinition(BeanDefinition beanDefinition, Object data) throws BeansException; 043 044 void visitMutablePropertyValues(MutablePropertyValues propertyValues, Object data) throws BeansException; 045 046 void visitConstructorArgumentValues(ConstructorArgumentValues constructorArgumentValues, Object data) throws BeansException; 047 048 void visitConstructorArgumentValue(ConstructorArgumentValues.ValueHolder valueHolder, Object data) throws BeansException; 049 050 void visitPropertyValue(PropertyValue propertyValue, Object data) throws BeansException; 051 052 void visitRuntimeBeanReference(RuntimeBeanReference beanReference, Object data) throws BeansException; 053 054 void visitCollection(Collection collection, Object data) throws BeansException; 055 056 void visitMap(Map map, Object data) throws BeansException; 057 058 void visitObject(Object value, Object data) throws BeansException; 059 060 void visitBeanDefinitionHolder(BeanDefinitionHolder beanDefinitionHolder, Object data) throws BeansException; 061}