org.springframework.beans.annotation

## Class 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.
  Since:
    2.0
  Author:
    Rob Harrop, Juergen Hoeller

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AnnotationBeanUtils()`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static void` | `copyPropertiesToBean(Annotation ann, Object bean, String... excludedProperties)` Copy the properties of the supplied `Annotation` to the supplied target bean.
    `static void` | `copyPropertiesToBean(Annotation ann, Object bean, StringValueResolver valueResolver, String... excludedProperties)` Copy the properties of the supplied `Annotation` to the supplied target bean.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AnnotationBeanUtils

          public AnnotationBeanUtils()

  - ### Method Detail

    - #### copyPropertiesToBean

          public static void copyPropertiesToBean(Annotation ann,
                                  Object bean,
                                  String... excludedProperties)

      Copy the properties of the supplied `Annotation` to the supplied target bean. Any properties defined in `excludedProperties` will not be copied.
      Parameters:
        `ann` - the annotation to copy from
        `bean` - the bean instance to copy to
        `excludedProperties` - the names of excluded properties, if any
      See Also:
        `BeanWrapper`

    - #### copyPropertiesToBean

          public static void copyPropertiesToBean(Annotation ann,
                                  Object bean,
                                  StringValueResolver valueResolver,
                                  String... excludedProperties)

      Copy the properties of the supplied `Annotation` to the supplied target bean. Any properties defined in `excludedProperties` will not be copied.

      A specified value resolver may resolve placeholders in property values, for example.

      Parameters:
        `ann` - the annotation to copy from
        `bean` - the bean instance to copy to
        `valueResolver` - a resolve to post-process String property values (may be `null`)
        `excludedProperties` - the names of excluded properties, if any
      See Also:
        `BeanWrapper`