Search in sources :

Example 1 with StaticValue

use of org.nutz.ioc.val.StaticValue in project nutz by nutzam.

the class Iocs method wrap.

public static IocObject wrap(Object obj) {
    IocObject iobj = new IocObject();
    //iobj.setType(obj.getClass());
    iobj.setFactory(Iocs.class.getName() + "#self");
    IocValue ival = new IocValue(null, new StaticValue(obj));
    iobj.addArg(ival);
    return iobj;
}
Also used : IocValue(org.nutz.ioc.meta.IocValue) IocObject(org.nutz.ioc.meta.IocObject) StaticValue(org.nutz.ioc.val.StaticValue)

Aggregations

IocObject (org.nutz.ioc.meta.IocObject)1 IocValue (org.nutz.ioc.meta.IocValue)1 StaticValue (org.nutz.ioc.val.StaticValue)1