Example usage for org.springframework.beans.factory.config DependencyDescriptor getDependencyName

List of usage examples for org.springframework.beans.factory.config DependencyDescriptor getDependencyName

Introduction

In this page you can find the example usage for org.springframework.beans.factory.config DependencyDescriptor getDependencyName.

Prototype

@Nullable
public String getDependencyName() 

Source Link

Document

Determine the name of the wrapped parameter/field.

Usage

From source file:org.jdal.aop.SerializableProxyUtils.java

/**
 * Create a new Serializable proxy for the given target
 * @param target target to proxy// ww w . j a  v  a  2 s .  c  om
 * @param proxyTargetClass true to force CGLIB proxies
 * @param useMemoryCache if true keep a reference to target object in memory
 * @param beanFactory beanFactory to use.
 * @param descriptor Dependency descriptor
 * @param beanName name of bean holding the dependency
 * @return a new serializable proxy
 */
public static Object createSerializableProxy(Object target, boolean proxyTargetClass, boolean useMemoryCache,
        ConfigurableListableBeanFactory beanFactory, DependencyDescriptor descriptor, String beanName) {
    if (target instanceof SerializableAopProxy)
        return target;

    if (log.isDebugEnabled())
        log.debug("Creating serializable proxy for [" + descriptor.getDependencyName() + "]" + " in bean ["
                + beanName + "]");

    SerializableReference reference = new SerializableReference(target, proxyTargetClass, useMemoryCache,
            beanFactory, descriptor, beanName);

    return createSerializableProxy(target, reference);
}