org.springframework.roo.classpath.details.annotations.populator
Class AutoPopulationUtils

java.lang.Object
  extended by org.springframework.roo.classpath.details.annotations.populator.AutoPopulationUtils

public abstract class AutoPopulationUtils
extends Object

Automatically populates the AutoPopulate annotated fields on a given Object.

Since:
1.0
Author:
Ben Alex

Constructor Summary
AutoPopulationUtils()
           
 
Method Summary
static void populate(Object target, AnnotationMetadata annotation)
          Introspects the target Object for its declared fields, locating all AutoPopulate annotated fields.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoPopulationUtils

public AutoPopulationUtils()
Method Detail

populate

public static final void populate(Object target,
                                  AnnotationMetadata annotation)
Introspects the target 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

Parameters:
target - to put values into (mandatory, cannot be null)
annotation - to obtain values from (can be null, for convenience of the caller)


Copyright © 2009-2010 VMware, Inc. All Rights Reserved.