Examples of InstantiatorFactory


Examples of co.cask.tigon.lang.InstantiatorFactory

      // Creates QueueSpecification
      Table<Node, String, Set<QueueSpecification>> queueSpecs = new SimpleQueueSpecificationGenerator().create(
        flowSpec);

      Flowlet flowlet = new InstantiatorFactory(false).get(TypeToken.of(flowletClass)).create();
      TypeToken<? extends Flowlet> flowletType = TypeToken.of(flowletClass);

      // Set the context classloader to the Tigon classloader. It is needed for the DatumWriterFactory be able
      // to load Tigon classes
      Thread.currentThread().setContextClassLoader(FlowletProgramRunner.class.getClassLoader());
View Full Code Here

Examples of co.cask.tigon.lang.InstantiatorFactory

  @SuppressWarnings("unchecked")
  public ReflectionDatumReader(Schema schema, TypeToken<T> type) {
    this.schema = schema;
    this.type = type;
    this.creatorFactory = new InstantiatorFactory(true);
    this.creators = Maps.newIdentityHashMap();
    this.fieldAccessorFactory = new ReflectionFieldAccessorFactory();
  }
View Full Code Here

Examples of org.jboss.weld.util.reflection.instantiation.InstantiatorFactory

        if (resourceLoader == null) {
            resourceLoader = DefaultResourceLoader.INSTANCE;
            registry.add(ResourceLoader.class, resourceLoader);
        }

        InstantiatorFactory factory = registry.get(InstantiatorFactory.class);
        if (factory == null) {
            registry.add(InstantiatorFactory.class, new DefaultInstantiatorFactory(resourceLoader));
        }

        ServiceRegistry services = new SimpleServiceRegistry();
View Full Code Here

Examples of org.jboss.weld.util.reflection.instantiation.InstantiatorFactory

        Constructor<?> constructor;
        try {
            constructor = AccessController.doPrivileged(GetDeclaredConstructorAction.of(clazz));
        } catch (PrivilegedActionException e) {
            InstantiatorFactory factory = services.get(InstantiatorFactory.class);
            if (factory == null || !(factory.useInstantiators())) {
                return ValidatorLogger.LOG.notProxyableNoConstructor(clazz, getDeclaringBeanInfo(declaringBean));
            } else {
                return null;
            }
        }
        if (constructor == null) {
            return ValidatorLogger.LOG.notProxyableNoConstructor(clazz, getDeclaringBeanInfo(declaringBean));
        } else if (Modifier.isPrivate(constructor.getModifiers())) {
            InstantiatorFactory factory = services.get(InstantiatorFactory.class);
            if (factory == null || !(factory.useInstantiators())) {
                return new UnproxyableResolutionException(ValidatorLogger.LOG.notProxyablePrivateConstructor(clazz, constructor, getDeclaringBeanInfo(declaringBean)));
            } else {
                return null;
            }
        } else if (Reflections.isTypeOrAnyMethodFinal(clazz)) {
View Full Code Here

Examples of org.jboss.weld.util.reflection.instantiation.InstantiatorFactory

        List<Class<?>> list = new ArrayList<Class<?>>(additionalInterfaces);
        Collections.sort(list, ClassHierarchyComparator.INSTANCE);
        additionalInterfaces.clear();
        additionalInterfaces.addAll(list);

        InstantiatorFactory factory = Container.instance(contextId).services().get(InstantiatorFactory.class);
        if (factory != null && factory.useInstantiators() && isCreatingProxy()) {
            this.instantiatorFactory = factory;
        } else {
            this.instantiatorFactory = null;
        }
    }
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.