Examples of newInstance()


Examples of lombok.val.newInstance()

    if (constructors.length <= 0)
      throw new IllegalArgumentException("A constructor with " + constructorArgsLength + " arguments was not found: " + clazz.getName());

    val constructor = constructors.length == 1 ? constructors[0] : matchConstructor(constructors, constructorArgs);

    return (T) constructor.newInstance(constructorArgs);
  }

  private static Predicate1<Constructor<?>> constructorParametersEqual(final int _len)
  {
    return new Predicate1<Constructor<?>>() {
View Full Code Here

Examples of lupos.distributed.p2p.query.withsubgraph.P2P_QueryClient_Creator.newInstance()

   */
  public static QueryClient newInstance() {
    try {
      P2P_QueryClient_Creator creator = new P2P_QueryClient_Creator(
          NETWORK, DISTRIBUTION);
      QueryClient instance = creator.newInstance();
      return instance;
    } finally {
    }
  }

View Full Code Here

Examples of ma.glasnost.orika.impl.generator.MultiOccurrenceVariableRef.newInstance()

       
        append(out,
                s.ifNotNull() + " {");
       
        if (d.isAssignable()) {
            out.append(statement(newDest.declare(newDest.newInstance(d.newMap()))));
        } else {
            out.append(statement(newDest.declare(d)));
            out.append(statement("%s.clear()", newDest));
        }
       
View Full Code Here

Examples of net.sf.cglib.Factory.newInstance()

     */
    Object newProxy() {
        Class clazz = mapping.getMappedClass();
        Factory sample = (Factory) factory.getSample(clazz);
        if (sample != null) {
            proxy = sample.newInstance(this);
            setProxy(proxy);
            return proxy;
        }
        Class[] interfaces;
        ClassLoader loader = clazz.getClassLoader();
View Full Code Here

Examples of net.sf.cglib.proxy.Factory.newInstance()

            }

            result = (Factory)Enhancer.create(proxyClass, interfaces, (Callback)handler);
            proxyFactories.put(proxyClass, result);
        } else {
            result = factory.newInstance((Callback)handler);
        }
        return (OJBProxy)result;
    }

    public boolean isNormalOjbProxy(Object proxyOrObject) {
View Full Code Here

Examples of net.sf.cglib.reflect.FastClass.newInstance()

       
        try {

            Class<?> errorHandlerFactoryClass = Class.forName(errorHandlerFactoryName);
            FastClass errorHandlerFactoryFastClass = FastClass.create(errorHandlerFactoryClass);
            ErrorHandlerFactory errorHandlerFactory = (ErrorHandlerFactory) errorHandlerFactoryFastClass.newInstance();

            context.setAttribute(ErrorHandlerFactory.KEY, errorHandlerFactory);

        } catch (Throwable e) {
View Full Code Here

Examples of net.sf.cglib.reflect.FastConstructor.newInstance()

            throw new DeploymentException("Could not constuct URI for location of enhanced class", e);
        }
        Enhancer.registerCallbacks(serviceClass, methodInterceptors);
        FastConstructor constructor = FastClass.create(serviceClass).getConstructor(SERVICE_CONSTRUCTOR_TYPES);
        try {
            return constructor.newInstance(new Object[]{seiPortNameToFactoryMap, seiClassNameToFactoryMap});
        } catch (InvocationTargetException e) {
            throw new DeploymentException("Could not construct service instance", e.getTargetException());
        }
    }
View Full Code Here

Examples of net.sf.isolation.reflection.IsoReflectionManager.newInstance()

      String columnName = metaData.getColumnName(i + 1);
      columnNames[i] = columnName;
      log.trace("Catch of column: {0}", columnName);
    }
    while (resultSet.next()) {
      Object bean = reflectionManager.newInstance(klass);
      for (int i = 0; i < columnCount; i++) {
        String columnName = columnNames[i];
        IsoSQLResultSetProcessorColumnInfo columnInfo = columnsInfo
            .get(columnName);
        Object value;
View Full Code Here

Examples of net.sf.joafip.store.service.proxy.IInstanceFactory.newInstance()

      FilePersistenceDataCorruptedException,
      FilePersistenceNotSerializableException, ProxyException,
      FilePersistenceTooBigForSerializationException {
    session.open();
    final IInstanceFactory instanceFactory = session.getInstanceFactory();
    final Bob1 bob1 = (Bob1) instanceFactory.newInstance(Bob1.class);
    session.save();
    assertFalse("must not be loaded",
        ProxyManager2.proxiedObjectIsLoaded(bob1));
    saveDoneFlag = false;
    final BobForAutoSaveWhenConstructTest bobForAutoSaveTest = (BobForAutoSaveWhenConstructTest) instanceFactory
View Full Code Here

Examples of net.sourceforge.javautil.common.reflection.cache.ClassDescriptor.newInstance()

    for (String name : this.extensions.keySet()) {
      ClassDescriptor cd = ClassCache.getFor(ReflectionUtil.getClass(this.extensions.get(name).className, this.classContext));

      if (this.isExtensionLoaded(cd.getDescribedClass())) continue;
     
      IWebApplicationExtension extension = (IWebApplicationExtension) cd.newInstance(this);
     
      if (!extension.shouldLoad(webXml)) continue;
     
      this.loadedExtensions.add(extension);
      if (this.extensions.get(name).settings != 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.