Examples of Factory


Examples of org.ow2.easybeans.api.Factory

     * @throws PoolException if removal is failing
     */
    @SuppressWarnings("unchecked")
    protected void remove(final EasyBeansInvocationContext invocationContext) throws PoolException {
        // Gets the factory
        Factory factory = invocationContext.getFactory();

        // factory is a session factory.
        SessionFactory sessionFactory = (SessionFactory) factory;

        // get pool
View Full Code Here

Examples of org.sonatype.sisu.siesta.client.ClientBuilder.Target.Factory

    checkNotNull(context, "context cannot be null");

    if (!type.isInterface()) {
      return null;
    }
    final Factory factory = (Factory) context.get(Factory.class);
    if (factory == null) {
      return null;
    }
    if (hasPathAnnotation(type)) {
      return factory.build(type);
    }
    for (final Method method : type.getMethods()) {
      if (method.getAnnotation(Path.class) != null) {
        return factory.build(type);
      }
    }
    return null;
  }
View Full Code Here

Examples of org.springframework.cglib.proxy.Factory

            Enhancer enhancer = new Enhancer();
            enhancer.setSuperclass(type);
            enhancer.setInterfaces(new Class<?>[]{MethodInvocationInfo.class});
            enhancer.setCallbackType(org.springframework.cglib.proxy.MethodInterceptor.class);

            Factory factory = (Factory) objenesis.newInstance(enhancer.createClass());
            factory.setCallbacks(new Callback[]{interceptor});
            return (T) factory;
        }
    }
View Full Code Here

Examples of org.switchyard.serial.graph.Factory

    public Object decompose(final Graph graph) {
        if (getClazz() == null) {
            return null;
        }
        final Class clazz = (Class)graph.decomposeReference(getClazz());
        final Factory factory = Factory.getFactory(clazz);
        final Object obj;
        if (factory.supports(clazz)) {
            obj = factory.create(clazz, this);
        } else {
            final String className = clazz != null ? clazz.getName() : "null";
            SerialLogger.ROOT_LOGGER.classUnsupportedByFactoryReturningNull(className, factory.getClass().getName());
            obj = null;
        }
        Map<String, Integer> ids = getIds();
        if (obj != null && ids != null) {
            for (final Access access : getAccessList(clazz)) {
View Full Code Here

Examples of org.terrier.structures.BasicLexiconEntry.Factory

    assertEquals(le.getFrequency(), 15);
  }
 
  @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());
    BasicLexiconEntry leReader = (BasicLexiconEntryf.newInstance();
    populateEntry(leReader, b);
    assertEquals(le.getTermId(), leReader.getTermId());
    assertEquals(le.getFrequency(), leReader.getFrequency());
    assertEquals(le.getDocumentFrequency(), leReader.getDocumentFrequency());
    assertEquals(le.getOffset(), leReader.getOffset());
View Full Code Here

Examples of org.testng.annotations.Factory

  }

  @SuppressWarnings({"deprecation"})
  private IAnnotation createFactoryTag(Annotation a) {
    FactoryAnnotation result = new FactoryAnnotation();
    Factory c = (Factory) a;
    result.setParameters(c.parameters());
   
    return result;
  }
View Full Code Here

Examples of org.unicode.cldr.util.Factory

      }
      if (thrown != null) {
        System.err.println("Ignoring " + procName + " (" + thrown + ")");
      }
    }
    Factory cldrFactory = Factory.make(sourceDir, ".*");
    Set<String> locales = cldrFactory.getAvailable();
    if (restrictLocales != null) {
      Set<String> newLocales = new HashSet<String>();
      newLocales.add("root")// always include root or things break
      for (String locale : restrictLocales.split(",")) {
        if (!locales.contains(locale)) {
View Full Code Here

Examples of org.waveprotocol.box.server.waveserver.LocalWaveletContainer.Factory

    certificateManager = new CertificateManagerImpl(true, localSigner, null, null);
    final DeltaStore deltaStore = new MemoryDeltaStore();
    final Executor waveletLoadExecutor = MoreExecutors.sameThreadExecutor();
    final Executor persistExecutor = MoreExecutors.sameThreadExecutor();
    final Executor storageContinuationExecutor = MoreExecutors.sameThreadExecutor();
    Factory localWaveletContainerFactory = new LocalWaveletContainer.Factory() {
      @Override
      public LocalWaveletContainer create(WaveletNotificationSubscriber notifiee,
          WaveletName waveletName, String waveDomain) {
        return new LocalWaveletContainerImpl(waveletName, notifiee,
            WaveServerModule.loadWaveletState(waveletLoadExecutor, deltaStore, waveletName, persistExecutor),
View Full Code Here

Examples of pl.edu.amu.wmi.daut.re.AlternativeOperator.Factory

    /**
     * Test fabryki operatora.
     */
    public final void testFactory() {
        Factory factory = new Factory();
        ArrayList<String> params = new ArrayList<String>();

        assertEquals(factory.createOperator(params).getClass(),
            new AlternativeOperator().getClass());
    }
View Full Code Here

Examples of pl.edu.amu.wmi.daut.re.AnyOrderOperator.Factory

    /**
     * Test fabryki.
     */
    public final void testFactory() {
        Factory factory = new Factory();
        ArrayList<String> params = new ArrayList<String>();
        assertEquals(factory.createOperator(params).getClass(),
                new AnyOrderOperator().getClass());
    }
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.