package cc.smtweb.framework.core.mvc.controller.access;

import cc.smtweb.framework.core.mvc.controller.IBeanContext;

import java.lang.reflect.Field;
import java.util.Map;

public class SingletonFieldAccess extends FieldAccess {
    private final Object fieldValue;

    public SingletonFieldAccess(Object fieldValue, Field field) {
        super(field);
        this.fieldValue = fieldValue;
    }

    @Override
    protected Object getFieldValue(Object instance, IBeanContext context, Map<String, Object> params) {
        return fieldValue;
    }
}
