Search in sources :

Example 1 with EjectByGetter

use of org.nutz.lang.eject.EjectByGetter in project nutz by nutzam.

the class JsonEntityField method eval.

/**
     * 根据名称获取字段实体, 默认以set优先
     */
public static JsonEntityField eval(String name, Method getter, Method setter) {
    JsonEntityField jef = new JsonEntityField();
    jef.genericType = getter.getGenericReturnType();
    jef.name = name;
    jef.ejecting = new EjectByGetter(getter);
    jef.injecting = new InjectBySetter(setter);
    return jef;
}
Also used : EjectByGetter(org.nutz.lang.eject.EjectByGetter) InjectBySetter(org.nutz.lang.inject.InjectBySetter)

Aggregations

EjectByGetter (org.nutz.lang.eject.EjectByGetter)1 InjectBySetter (org.nutz.lang.inject.InjectBySetter)1