EMMA Coverage Report (generated Fri Aug 21 15:59:46 BST 2009)
[all classes][org.springframework.batch.core.configuration.xml]

COVERAGE SUMMARY FOR SOURCE FILE [BeanDefinitionUtils.java]

nameclass, %method, %block, %line, %
BeanDefinitionUtils.java100% (1/1)67%  (2/3)81%  (13/16)67%  (2/3)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class BeanDefinitionUtils100% (1/1)67%  (2/3)81%  (13/16)67%  (2/3)
BeanDefinitionUtils (): void 0%   (0/1)0%   (0/3)0%   (0/1)
getAttribute (String, String, ConfigurableListableBeanFactory): Object 100% (1/1)100% (6/6)100% (1/1)
getPropertyValue (String, String, ConfigurableListableBeanFactory): PropertyV... 100% (1/1)100% (7/7)100% (1/1)

1/*
2 * Copyright 2006-2007 the original author or authors.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16package org.springframework.batch.core.configuration.xml;
17 
18import org.springframework.beans.PropertyValue;
19import org.springframework.beans.factory.BeanFactory;
20import org.springframework.beans.factory.config.ConfigurableListableBeanFactory;
21 
22/**
23 * @author Dan Garrette
24 * @since 2.0.1
25 */
26public class BeanDefinitionUtils {
27 
28        /**
29         * @param beanName a bean definition name
30         * @param propertyName the name of the property
31         * @param beanFactory a {@link BeanFactory}
32         * @return The {@link PropertyValue} for the property of the bean. Search
33         *         parent hierarchy if necessary. Return null if none is found.
34         */
35        public static PropertyValue getPropertyValue(String beanName, String propertyName,
36                        ConfigurableListableBeanFactory beanFactory) {
37                return beanFactory.getMergedBeanDefinition(beanName).getPropertyValues().getPropertyValue(propertyName);
38        }
39 
40        /**
41         * @param beanName a bean definition name
42         * @param attributeName the name of the property
43         * @param beanFactory a {@link BeanFactory}
44         * @return The value for the attribute of the bean. Search parent hierarchy
45         *         if necessary. Return null if none is found.
46         */
47        public static Object getAttribute(String beanName, String attributeName, ConfigurableListableBeanFactory beanFactory) {
48                return beanFactory.getMergedBeanDefinition(beanName).getAttribute(attributeName);
49        }
50}

[all classes][org.springframework.batch.core.configuration.xml]
EMMA 2.0.5312 (C) Vladimir Roubtsov