<p>newInstance.</p>

@param name a {@link java.lang.String} object.
@return a {@link com.greenpepper.server.domain.EnvironmentType} object.
480002
public static EnvironmentType newInstance(String name)
    {
    	EnvironmentType env = new EnvironmentType();
    	env.setName(name);
        return env;
    }
951920
public RuntimeEnvironmentBuilder addConfiguration(String name, String value) {
        if (name == null || value == null) {
            return this;
        }
        _runtimeEnvironment.addToConfiguration(name, value);

        return this;
    }
1332993
public static <T> T newInstance(Type type) {
        try {
            Class<T> clazz = (Class<T>) getClass(type);
            if (clazz == null) {
                return null;
            }
            return clazz.newInstance();
        } catch (Exception e) {
            log.warn("new instance fail :{}", e.getCause().toString());
            throw new NewInstanceException(e.getCause().toString());
        }
    }
1094968
public CloseableHttpClient build(String name) {
        final CloseableHttpClient client = buildWithDefaultRequestConfiguration(name).getClient();
        // If the environment is present, we tie the client with the server lifecycle
        if (environment != null) {
            environment.lifecycle().manage(new Managed() {
                @Override
                public void start() throws Exception {
                }

                @Override
                public void stop() throws Exception {
                    client.close();
                }
            });
        }
        return client;
    }
487708
public static Map<String, String> createEnvironment(Map<String, String> environment)
    {
        Map<String, String> result = null;
        
        try
        {
            result = EnvironmentUtils.getProcEnvironment();
        }
        catch (IOException ex)
        {
            throw new ElasticsearchSetupException(
                    "Cannot get the current process environment", ex);
        }
        
        // Clean up the base environment:

        // The elasticsearch start and plugin scripts print warnings if these environment variables
        // are set, so lets unset them.
        result.remove("JAVA_TOOL_OPTIONS");
        result.remove("JAVA_OPTS");

        // The following environment variables may interfere with the elasticsearch instance.
        result.remove("ES_HOME");
        result.remove("ES_JAVA_OPTS");
        result.remove("ES_PATH_CONF");
        result.remove("ES_TMPDIR");

        // Now that we have a clean environment, set the provided variables on it.
        if (environment != null)
        {
            result.putAll(environment);
        }

        return result;
    }
289851
@MemberOrder(sequence = "2")
    public DevUtilsDemoObject create(
            @ParameterLayout(named="Name") final String name) {
        final DevUtilsDemoObject obj = container.newTransientInstance(DevUtilsDemoObject.class);
        obj.setName(name);
        container.persistIfNotAlready(obj);
        return obj;
    }
649941
public static Runner newInstance(String name)
    {
        Runner runner = new Runner();
        runner.setName(name);
        
        return runner;
    }
1229994
@Override
    protected T createInstance() throws Exception {
        for (final String beanName : this.delegateBeanNames) {
            try {
                final T bean;
                if (this.type == null) {
                    bean = (T) this.getBeanFactory().getBean(beanName);
                } else {
                    bean = this.getBeanFactory().getBean(beanName, this.type);
                }

                if (this.logger.isInfoEnabled()) {
                    this.logger.info("Loaded bean for name " + beanName);
                }

                return bean;
            } catch (final Exception e) {
                final String msg =
                        "Failed to load bean '"
                                + beanName
                                + "' from ApplicationContext"
                                + (this.type != null ? " expecting type: " + this.type : "")
                                + ". Will try to load the next bean in the list instead. Error message from the attempt to load this bean ('"
                                + beanName
                                + "'): ";

                if (this.logger.isDebugEnabled()) {
                    this.logger.debug(msg, e);
                } else if (this.logger.isInfoEnabled()) {
                    this.logger.info(
                            msg + " " + e.getMessage() + " (enable debug for stack trace)");
                }
            }
        }

        throw new BeanCreationException(
                "None of the configured bean names could be loaded. BeanNames: "
                        + this.delegateBeanNames);
    }
994869
@SuppressWarnings("unchecked")
    public static <T> T newInstance(String name, Class<?> objectType) {
        return (T) Proxy.newProxyInstance(
                ClassLoaderUtils.getClassLoader(),
                new Class[]{objectType},
                new LazyJndiResolver(name));
    }
1072700
public Client build(String name) {
        if ((environment == null) && ((executorService == null) || (objectMapper == null))) {
            throw new IllegalStateException("Must have either an environment or both " +
                    "an executor service and an object mapper");
        }

        if (executorService == null) {
            // Create an ExecutorService based on the provided
            // configuration. The DisposableExecutorService decorator
            // is used to ensure that the service is shut down if the
            // Jersey client disposes of it.
            executorService = requireNonNull(environment).lifecycle()
                .executorService("jersey-client-" + name + "-%d")
                .minThreads(configuration.getMinThreads())
                .maxThreads(configuration.getMaxThreads())
                .workQueue(new ArrayBlockingQueue<>(configuration.getWorkQueueSize()))
                .build();
        }

        if (objectMapper == null) {
            objectMapper = requireNonNull(environment).getObjectMapper();
        }

        if (environment != null) {
            validator = environment.getValidator();
        }

        return build(name, executorService, objectMapper, validator);
    }
903718
public Object newInstance(String className) {
        try {
            return classLoader.loadClass(className).newInstance();
        } catch (Exception e) {
            throw new ScalaInstanceNotFound(className);
        }
    }
794371
public <T> T getOnce(final Class<T> clazz, final String name)
	{
		return new JAXBNamedResourceFactory<T>(this.config, this.factory, name, clazz).get();
	}
987001
@SuppressWarnings("unchecked")
  public <T extends Entity<?>> T newInstance(final Class<T> clazz) {
    return (T) getEntityType(clazz).newInstance();
  }
922442
public static Domain create(final String name) throws AppPlatformException, ParseException, Exception {
        return create(name, null);
    }
1311250
public static AliasedDiscoveryConfig newAliasedDiscoveryConfig(String name) {
        if ("aws".equals(name)) {
            return new ClientAwsConfig();
        } else {
            return AliasedDiscoveryConfigUtils.newConfigFor(name);
        }
    }
727324
public static Builder newBuilder(BucketInfo bucketInfo, String name) {
    return newBuilder(bucketInfo.getName(), name);
  }
1002211
public static <T> ParameterBuilder<T> create(String name) {
    return new ParameterBuilder<T>()
        .name(name);
  }