public class DefaultFieldSetter extends Object implements FieldSetterStrategy
Insert
.Constructor and Description |
---|
DefaultFieldSetter() |
Modifier and Type | Method and Description |
---|---|
protected Object |
getValue(Field f,
Object o,
ApplicationContext context)
Searches for a value to satisfy the field.
|
protected Object |
setApplicationContext(Field f,
ApplicationContext context,
Object find)
If the given object find is null and ApplicationContet is assignable from the type of f.
|
void |
setFields(Class<?> klass,
Object o,
ApplicationContext context) |
public void setFields(Class<?> klass, Object o, ApplicationContext context) throws UnsettableFieldException
setFields
in interface FieldSetterStrategy
UnsettableFieldException
protected Object getValue(Field f, Object o, ApplicationContext context) throws UnsettableFieldException
Insert
annotation. To support other annotations, override this method and return the value that should be
set on the given field f.f
- the fieldo
- the object to set the value oncontext
- the context to look for dependenciesUnsettableFieldException
protected Object setApplicationContext(Field f, ApplicationContext context, Object find)
f
- context
- find
- Copyright © 2012 redlab.be. All Rights Reserved.