Examples of InstanceFactory


Examples of nexj.core.rpc.InstanceFactory

            throw new UncheckedException("err.rpc.valueDeserialization", e);
         }
      }

      TransferObject instances = (TransferObject)tobj.findValue(":instances");
      InstanceFactory factory = null;

      for (int i = 0, n = m_flow.getVariableCount(); i != n; ++i)
      {
         Variable var = m_flow.getVariable(i);
         Object value = tobj.findValue(var.getName());

         if (value == null && instances != null)
         {
            value = instances.findValue(var.getName());

            if (value instanceof List || value instanceof TransferObject)
            {
               if (factory == null)
               {
                  factory = new InstanceFactory(context);
               }

               value = factory.instantiate(value);
            }
         }

         setValue(var, value);
      }
View Full Code Here

Examples of org.apache.cocoon.precept.InstanceFactory

        return ((Instance) session.getAttribute(instanceId));
    }


    final protected Instance createInstance(String id) throws ServiceException {
        InstanceFactory factory = (InstanceFactory) manager.lookup(InstanceFactory.ROLE);
        Instance instance = factory.createInstance(id);
        manager.release(factory);
        return (instance);
    }
View Full Code Here

Examples of org.apache.cocoon.precept.InstanceFactory

        return ((Instance) session.getAttribute(instanceId));
    }


    final protected Instance createInstance(String id) throws ComponentException {
        InstanceFactory factory = (InstanceFactory) manager.lookup(InstanceFactory.ROLE);
        Instance instance = factory.createInstance(id);
        manager.release(factory);
        return (instance);
    }
View Full Code Here

Examples of org.jboss.forge.classloader.mock.result.InstanceFactory

      {
         Assert.fail("Should have received a " + ClassCastException.class.getName() + " but was: " + e);
      }

      Object delegate = foreignType.newInstance();
      InstanceFactory enhancedFactory = (InstanceFactory) ClassLoaderAdapterBuilder.callingLoader(thisLoader)
               .delegateLoader(dep1Loader).enhance(delegate);

      Assert.assertTrue(Proxies.isForgeProxy(enhancedFactory));
      SuperInterface enhancedInstance = (SuperInterface) enhancedFactory.getRawInstance();
      Assert.assertTrue(Proxies.isForgeProxy(enhancedInstance));
   }
View Full Code Here

Examples of org.jboss.metatype.api.values.InstanceFactory

/*      */     throws Throwable
/*      */   {
/*  808 */     ClassInfo classInfo = beanInfo.getClassInfo();
/*  809 */     if (classInfo.isInterface())
/*      */     {
/*  811 */       InstanceFactory instanceFactory = (InstanceFactory)this.instanceFactoryMap.get(classInfo.getType());
/*  812 */       if (instanceFactory == null) {
/*  813 */         throw new IllegalArgumentException("Cannot instantiate interface BeanInfo, missing InstanceFactory: " + classInfo);
/*      */       }
/*  815 */       return instanceFactory.instantiate(beanInfo);
/*      */     }
/*  817 */     return beanInfo.newInstance();
/*      */   }
View Full Code Here

Examples of org.jboss.metatype.api.values.InstanceFactory

   protected Object createNewInstance(BeanInfo beanInfo) throws Throwable
   {
      ClassInfo classInfo = beanInfo.getClassInfo();
      if (classInfo.isInterface())
      {
         InstanceFactory instanceFactory = instanceFactoryMap.get(classInfo.getType());
         if (instanceFactory == null)
            throw new IllegalArgumentException("Cannot instantiate interface BeanInfo, missing InstanceFactory: " + classInfo);

         return instanceFactory.instantiate(beanInfo);
      }
      return beanInfo.newInstance();
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.