Package com.dyuproject.ioc

Examples of com.dyuproject.ioc.Context


    References _refs;
    Map<String,Object> _map;
   
    public References()
    {
        Context context = Context.getCurrent();
        if(context!=null)
            context.getAppContext().addRefs(this);
    }
View Full Code Here


public final class Reference
{
   
    static boolean setProps(Object ref, Map<String,Object> props)
    {
        Context context = Context.getCurrent();
        if(context==null)
        {
            Log.warn("No current context for Reference");
            return false;
        }
        Convertor c = context.getParser().getConvertorCache().getConvertor(ref.getClass(), true);
        return c instanceof JSONPojoConvertor && ((JSONPojoConvertor)c).setProps(ref, props)!=0;
    }
View Full Code Here

        }
    }
   
    static void importResource(String path, String type) throws IOException
    {
        Context context = Context.getCurrent();
        if(context==null)
        {
            Log.warn("Not in context.");
            return;
        }
        Resource resource = new Resource(path, type);
        context.getParser().getResolver().resolve(resource, context);
        if(!resource.isResolved())
            throw new IllegalStateException("resource not resolved.");
        try
        {
            context.getAppContext().addImport(ApplicationContext.load(resource,
                    context.getParser()));
        }
        finally
        {
            Context.setCurrent(context);
        }
View Full Code Here

TOP

Related Classes of com.dyuproject.ioc.Context

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.