net.sf.andromedaioc.bean.param.PropertyValueParser Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of andromeda-ioc Show documentation
Show all versions of andromeda-ioc Show documentation
Inversion of Control Framework for Android
The newest version!
package net.sf.andromedaioc.bean.param;
import net.sf.andromedaioc.model.beans.ValueModel;
import net.sf.andromedaioc.resource.ResourceProvider;
public class PropertyValueParser extends AbstractConstantValueParser {
private final ValueModel valueModel;
private final ResourceProvider resourceProvider;
public PropertyValueParser(ValueModel valueModel, Class> type, ResourceProvider resourceProvider) {
super(type);
this.valueModel = valueModel;
this.resourceProvider = resourceProvider;
}
@Override
protected Object getValue() {
return resourceProvider.getProperty(valueModel.getValue());
}
}