类 AnnotationBeanUtils
- java.lang.Object
- org.springframework.beans.annotation.AnnotationBeanUtils
public abstract class AnnotationBeanUtils extends Object
General utility methods for working with annotations in JavaBeans style.- 从以下版本开始:
- 2.0
- 作者:
- Rob Harrop, Juergen Hoeller
构造器概要
构造器 构造器 说明 AnnotationBeanUtils()
方法概要
所有方法 静态方法 具体方法 修饰符和类型 方法 说明 static void
copyPropertiesToBean(Annotation ann, Object bean, String... excludedProperties)
Copy the properties of the suppliedAnnotation
to the supplied target bean.static void
copyPropertiesToBean(Annotation ann, Object bean, StringValueResolver valueResolver, String... excludedProperties)
Copy the properties of the suppliedAnnotation
to the supplied target bean.
构造器详细资料
AnnotationBeanUtils
public AnnotationBeanUtils()
方法详细资料
copyPropertiesToBean
public static void copyPropertiesToBean(Annotation ann, Object bean, String... excludedProperties)
Copy the properties of the suppliedAnnotation
to the supplied target bean. Any properties defined inexcludedProperties
will not be copied.- 参数:
ann
- the annotation to copy frombean
- the bean instance to copy toexcludedProperties
- the names of excluded properties, if any- 另请参阅:
BeanWrapper
copyPropertiesToBean
public static void copyPropertiesToBean(Annotation ann, Object bean, StringValueResolver valueResolver, String... excludedProperties)
Copy the properties of the suppliedAnnotation
to the supplied target bean. Any properties defined inexcludedProperties
will not be copied.A specified value resolver may resolve placeholders in property values, for example.
- 参数:
ann
- the annotation to copy frombean
- the bean instance to copy tovalueResolver
- a resolve to post-process String property values (may benull
)excludedProperties
- the names of excluded properties, if any- 另请参阅:
BeanWrapper