public abstract class AutoPopulationUtils extends Object
AutoPopulate annotated fields on a given
Object.| Constructor and Description |
|---|
AutoPopulationUtils() |
| Modifier and Type | Method and Description |
|---|---|
static void |
populate(Object target,
AnnotationMetadata annotation)
Introspects the target
Object for its declared fields, locating
all AutoPopulate annotated fields. |
public static void populate(Object target, AnnotationMetadata annotation)
Object for its declared fields, locating
all AutoPopulate annotated fields. For each field, an attempt
will be made to locate the value from the passed
AnnotationMetadata. The annotation value will be converted into
the required field type, or silently skipped if this is not possible (eg
the user edited source code and made a formatting error). As such it is
important that the caller.target - to put values into (mandatory, cannot be null)annotation - to obtain values from (can be null, for convenience of
the caller)Copyright © 2009–2018 Pivotal Software, Inc.. All rights reserved.