Examples of newInstance()


Examples of org.radargun.stats.Statistics.newInstance()

            } catch (Exception e) {
               terminate(stressors);
               return errorResponse("Failed to create the filter or converter", e);
            }
            IteratingStressor stressor = new IteratingStressor(i, iterable, containerName, filter, converter,
                  maxNextFailures, numLoops, startLatch, stats.newInstance());
            stressors.add(stressor);
            stressor.start();
         }
      } finally {
         startLatch.countDown();
View Full Code Here

Examples of org.shiftone.cache.CacheFactory.newInstance()

        CacheFactory factory = getDelegate();
        Cache        cache   = null;

        try
        {
            cache = factory.newInstance(cacheName, timeoutMs, maxSize);

            if (factory != null)
            {
                cache = wrapDelegate(cacheName, cache);
            }
View Full Code Here

Examples of org.springframework.xd.dirt.integration.bus.converter.CompositeMessageConverterFactory.newInstance()

    ModuleTypeConversionPlugin plugin = context.getBean(ModuleTypeConversionPlugin.class);

    CompositeMessageConverterFactory factory = (CompositeMessageConverterFactory) TestUtils.getPropertyValue(
        plugin, "converterFactory");
    CompositeMessageConverter converters = factory.newInstance(MimeType.valueOf("application/x-xd-foo"));
    assertEquals(1, converters.getConverters().size());
    assertTrue(converters.getConverters().iterator().next() instanceof StubPojoToStringConverter);
  }

  @Test
View Full Code Here

Examples of org.terasology.world.block.items.BlockItemFactory.newInstance()

        if (block == null) {
            return "";
        }

        BlockItemFactory blockItemFactory = new BlockItemFactory(entityManager);
        EntityRef blockItem = blockItemFactory.newInstance(block);

        pickupBuilder.createPickupFor(blockItem, spawnPos, 60);
        return "Spawned block.";
    }
View Full Code Here

Examples of org.terrier.structures.BasicLexiconEntry.Factory.newInstance()

  }
 
  @Test public void testWritable() throws Exception
  {
    Factory f = new Factory();
    BasicLexiconEntry le = (BasicLexiconEntry)f.newInstance();
    le.setTermId(100);
    le.setOffset(10, (byte)11);
    byte[] b = getBytes(le);
    System.err.println("le written in "+b.length+" bytes");
    assertEquals(b.length, f.getSize());
View Full Code Here

Examples of org.terrier.structures.seralization.FixedSizeTextFactory.newInstance()

    MapFileWriter w = FSOrderedMapFile.mapFileWrite(file);
    FixedSizeWriteableFactory<Text> keyFactory = new FixedSizeTextFactory(20);
    int offset = 0;
    for(String key : testKeys)
    {
      Text wkey = keyFactory.newInstance();
      IntWritable wvalue = new IntWritable();
      wkey.set(key);
      wvalue.set(offset);

      w.write(wkey, wvalue);
View Full Code Here

Examples of railo.runtime.ComponentPage.newInstance()

      throw new ApplicationException("invalid component definition ["+callPath+"]");
      }
   
      ComponentPage cp = (ComponentPage)page;
     
    ComponentImpl c = cp.newInstance(pc,callPath,isRealPath);
        c.setInitalized(true);
        return c;
   
  }
}
View Full Code Here

Examples of railo.runtime.InterfacePage.newInstance()

    private static InterfaceImpl initInterface(PageContext pc,Page page,String callPath,boolean isRealPath, Map interfaceUDFs) throws PageException {
      if(!(page instanceof InterfacePage))
      throw new ApplicationException("invalid interface definition ["+callPath+"]");
    InterfacePage ip=(InterfacePage)page;
    InterfaceImpl i = ip.newInstance(callPath,isRealPath,interfaceUDFs);
    return i;
  }
   
    private static ComponentImpl initComponent(PageContext pc,Page page,String callPath,boolean isRealPath) throws PageException {
      if(!(page instanceof ComponentPage)){
View Full Code Here

Examples of sun.reflect.ConstructorAccessor.newInstance()

        ConstructorAccessor ca = constructorAccessor;   // read volatile
        if (ca == null) {
            ca = acquireConstructorAccessor();
        }
        @SuppressWarnings("unchecked")
        T inst = (T) ca.newInstance(initargs);
        return inst;
    }

    /**
     * {@inheritDoc}
 
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.