Examples of instantiate()


Examples of org.apache.beehive.controls.spi.bean.ControlFactory.instantiate()

        try
        {
            DiscoverClass discoverer = new DiscoverClass();
            Class factoryClass = discoverer.find( ControlFactory.class, DEFAULT_FACTORY_CLASS );
            ControlFactory factory = (ControlFactory)factoryClass.newInstance();
            return factory.instantiate( beanClass, props, context, id );
        }
        catch ( Exception e )
        {
            throw new ControlException( "Exception creating ControlBean", e );
        }
View Full Code Here

Examples of org.apache.beehive.controls.spi.context.ControlBeanContextFactory.instantiate()

        try
        {
            DiscoverClass discoverer = new DiscoverClass();
            Class factoryClass = discoverer.find(ControlBeanContextFactory.class, DefaultControlBeanContextFactory.class.getName());
            ControlBeanContextFactory factory = (ControlBeanContextFactory)factoryClass.newInstance();
            _cbc = factory.instantiate(this);
        }
        catch (Exception e) {
            throw new ControlException("Exception creating ControlBeanContext", e);
        }
View Full Code Here

Examples of org.apache.lenya.cms.publication.templating.Instantiator.instantiate()

            Instantiator instantiator = null;
            ServiceSelector selector = null;
            try {
                selector = (ServiceSelector) getManager().lookup(Instantiator.ROLE + "Selector");
                instantiator = (Instantiator) selector.select(defaultPub.getInstantiatorHint());
                instantiator.instantiate(defaultPub, pubId, "Mock");
                configureProxy(area, proxyUrl);
            } finally {
                if (selector != null) {
                    if (instantiator != null) {
                        selector.release(instantiator);
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginListValue.instantiate()

        PluginListValue partitions = new PluginListValue("partitions");
        String[] types = (String[])Array.newInstance(String.class, _partProperties.size());
        Arrays.fill(types, _type.getName());
        partitions.setClassNames(types);
        partitions.setProperties(_partProperties.toArray(new String[_partProperties.size()]));
        DataCache[] array = (DataCache[])partitions.instantiate(_type, conf);
        for (DataCache part : array) {
            if (part.getName() == null)
                throw new UserException(_loc.get("partition-cache-null-partition", parts));
            if (_partitions.containsKey(part.getName()))
                throw new UserException(_loc.get("partition-cache-duplicate-partition", part.getName(), parts));
View Full Code Here

Examples of org.apache.openjpa.lib.conf.PluginValue.instantiate()

    public static OpenJPAEntityManagerFactory newFactory(BrokerFactory bf) {
        OpenJPAConfiguration conf = bf.getConfiguration();
        PluginValue val = (PluginValue) conf.getValue(KEY);
        if (val == null)
            return null;
        EntityManagerFactoryImpl emf = (EntityManagerFactoryImpl) val.
            instantiate(EntityManagerFactoryImpl.class, conf, true);
        emf.setBrokerFactory(bf);
        return emf;
    }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.instantiate()

    public IMatchingResult buildMatcher(IEvaluatorContext eval) {
      org.rascalmpl.ast.Expression arg = this.getArgument();
      if (arg.hasType() && arg.hasName()) {
        Environment env = eval.getCurrentEnvt();
        Type type = arg.getType().typeOf(env, true, eval.getEvaluator());
        type = type.instantiate(env.getTypeBindings());
       
        // TODO: Question, should we allow non terminal types in splices?
        if (type instanceof NonTerminalType) {
          throw new UnsupportedOperation("splicing match", type, this);
//          throw new ImplementationError(null);
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.instantiate()

          if (v.getType().isSubtypeOf(declaredType)) {
            // TODO: do we actually want to instantiate the locally
            // bound type parameters?
            Map<Type, Type> bindings = new HashMap<Type, Type>();
            declaredType.match(v.getType(), bindings);
            declaredType = declaredType.instantiate(bindings);
            // Was: r = makeResult(declaredType,
            // applyRules(v.getValue()));
            r = org.rascalmpl.interpreter.result.ResultFactory
                .makeResult(declaredType, v.getValue(), __eval);
            __eval.getCurrentEnvt().storeVariable(var.getName(), r);
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.instantiate()

    Type paramType = tf.parameterType("T");
    Type adtType = tf.abstractDataType(ts, "Option", paramType);
    Map<Type,Type> bindings = new HashMap<Type,Type>();
    bindings.put(paramType, t);
    adtType = adtType.instantiate(bindings);

    return adtType;
  }
}
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.instantiate()

        // Instantiate first using the type actually given in the parameter,
        // e.g., for T[str], with data T[&U] = ..., instantate the binding
        // of &U = str, and then instantate using bindings from the current
        // environment (generally meaning we are inside a function with
        // type parameters, and those parameters are now bound to real types)
        return type.instantiate(bindings).instantiate(__eval.getTypeBindings());
      }

      throw new UndeclaredType(name, this);

    }
View Full Code Here

Examples of org.eclipse.imp.pdb.facts.type.Type.instantiate()

    @Override
    public IMatchingResult buildMatcher(IEvaluatorContext eval) {
      Environment env = eval.getCurrentEnvt();
      Type type = getType().typeOf(env, true, eval.getEvaluator());

      type = type.instantiate(env.getTypeBindings());
     
      return new TypedVariablePattern(eval, this, type, getName());
    }

    @Override
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.