Once the above methods have been called to fill in the blanks, then call build to get
the actual instance.
@return the actual instance.
343642
public RemoteMenuController build() {
        if(protocol == null) {
            protocol = new TagValMenuCommandProtocol();
        }
        if(executorService == null) {
            executorService = Executors.newScheduledThreadPool(2,
                    new NamedDaemonThreadFactory("rs232-remote"));
        }
        Rs232RemoteConnector connector = new Rs232RemoteConnector(portName, baud, protocol, executorService);
        return new RemoteMenuController(connector, menuTree, executorService, name, clock);
    }
54190
public Parameter<T> build() {
    if (this.name == null) {
      throw new IllegalArgumentException("Name is missing.");
    }
    if (this.type == null) {
      throw new IllegalArgumentException("Type is missing.");
    }
    return new Parameter<T>(
        this.name,
        this.type,
        this.applicationId,
        this.defaultOsgiConfigProperty,
        this.defaultValue,
        new ValueMapDecorator(ImmutableMap.<String, Object>copyOf(this.properties)));
  }
856059
private AbstractBuild getBuildForDeprecatedMethods() {
        Executor e = Executor.currentExecutor();
        if(e!=null) {
            Executable exe = e.getCurrentExecutable();
            if (exe instanceof AbstractBuild) {
                AbstractBuild b = (AbstractBuild) exe;
                if(b.getProject()==this)
                    return b;
            }
        }
        R lb = getLastBuild();
        if(lb!=null)    return lb;
        return null;
    }
505355
public Counter build()
	{
		return new Counter(this.getName(), this.getDescription(), this.getNumShards(),
			this.getCounterStatus(), this.getCount(), this.getIndexes(), this.getCreationDateTime());
	}
1186311
public T copy() {
        T copy = Instantiator.of(type).instantiate();
        return copyInto(copy);
    }
905790
public ServiceRequestContext build() {
        // Determine the client address; use remote address unless overridden.
        final InetAddress clientAddress;
        if (this.clientAddress != null) {
            clientAddress = this.clientAddress;
        } else {
            clientAddress = remoteAddress().getAddress();
        }

        // Build a fake server which never starts up.
        final ServerBuilder serverBuilder = new ServerBuilder().meterRegistry(meterRegistry())
                                                               .workerGroup(eventLoop(), false)
                                                               .service(path(), service);
        serverConfigurators.forEach(configurator -> configurator.accept(serverBuilder));

        final Server server = serverBuilder.build();
        server.addListener(rejectingListener);

        // Retrieve the ServiceConfig of the fake service.
        final ServiceConfig serviceCfg = findServiceConfig(server, path(), service);

        // Build a fake object related with path mapping.
        final PathMappingContext pathMappingCtx = DefaultPathMappingContext.of(
                server.config().defaultVirtualHost(),
                localAddress().getHostString(),
                path(),
                query(),
                ((HttpRequest) request()).headers(),
                null);

        final PathMappingResult pathMappingResult =
                this.pathMappingResult != null ? this.pathMappingResult
                                               : PathMappingResult.of(path(), query());

        // Build the context with the properties set by a user and the fake objects.
        if (isRequestStartTimeSet()) {
            return new DefaultServiceRequestContext(
                    serviceCfg, fakeChannel(), meterRegistry(), sessionProtocol(), pathMappingCtx,
                    pathMappingResult, request(), sslSession(), proxiedAddresses, clientAddress,
                    requestStartTimeNanos(), requestStartTimeMicros());
        } else {
            return new DefaultServiceRequestContext(
                    serviceCfg, fakeChannel(), meterRegistry(), sessionProtocol(), pathMappingCtx,
                    pathMappingResult, request(), sslSession(), proxiedAddresses, clientAddress);
        }
    }
246570
public Object createInstanceQuietly() {
      try {
         return clazz.newInstance();
      } catch (InstantiationException e) {
         log.finest(e);
         return null;
      } catch (IllegalAccessException e) {
         log.finest(e);
         return null;
      }
   }
1197324
public static Executors getInstance() {
        if (instance == null) {
            synchronized (Executors.class) {
                if (instance == null) instance = new Executors();
            }
        }
        return instance;
    }
918237
protected T build() {
        final T instance;
        try {
            instance = build(connection(), maxContentLength(),
                                     isValidateHttpHeaders(), isPropagateSettings());
        } catch (Throwable t) {
            throw new IllegalStateException("failed to create a new InboundHttp2ToHttpAdapter", t);
        }
        connection.addListener(instance);
        return instance;
    }
1235103
public State build() {
		return new State(state, fanIn.get(), fanOut.get(), getCandidates(),
		        failedEvents.build(), state.hasNearDuplicate(), getNearestState(),
		        state.getDistToNearestState(), timeAdded);
	}
1206092
public int getBuild() throws IllegalArgumentException {
		String build = properties.getProperty("build.number");
		if(build==null) throw new IllegalArgumentException(accessor.getMessage("PropertiesVersions.getVersion.buildNotFound"));
		return Integer.parseInt(build);
	}
610781
public @Nullable String build() {
    StringBuilder queryString = new StringBuilder();

    for (NameValuePair param : params) {
      if (queryString.length() > 0) {
        queryString.append(PARAM_SEPARATOR);
      }
      queryString.append(Escape.urlEncode(param.getName()));
      queryString.append(VALUE_SEPARATOR);
      queryString.append(Escape.urlEncode(param.getValue()));
    }

    if (queryString.length() > 0) {
      return queryString.toString();
    }
    else {
      return null;
    }
  }
912928
public static HyphenatorBuilder getInstance() {

    if (instance == null) {
      synchronized (HyphenatorBuilderImpl.class) {
        if (instance == null) {
          HyphenatorBuilderImpl impl = new HyphenatorBuilderImpl();
          impl.initialize();
          instance = impl;
        }
      }
    }
    return instance;
  }
1117567
public IJobDetail build ()
  {

    final JobDetail job = new JobDetail ();

    job.setJobClass (m_aJobClass);
    job.setDescription (m_sDescription);
    if (m_aKey == null)
      m_aKey = new JobKey (Key.createUniqueName (null), null);
    job.setKey (m_aKey);
    job.setDurability (m_bDurability);
    job.setRequestsRecovery (m_bShouldRecover);

    if (!m_aJobDataMap.isEmpty ())
      job.setJobDataMap (m_aJobDataMap);

    return job;
  }
523582
public Entry buildWithHistory() {
        if (originalEntry == null) {
            throw new IllegalArgumentException("originalEntry is not set");
        }

        if (history == null) {
            history = new History();
        }

        Entry entryWithoutHistory = new EntryBuilder(originalEntry).history(new History()).build();
        history.getHistoricEntries().add(entryWithoutHistory);
        return build();
    }
168752
@Override
	public Launcher build() {
		LauncherImpl launcher = new LauncherImpl();
		launcher.setNativeFastCheck(nativeFastCheck);
		launcher.setPrintDebugCommandline(printDebugCommandline);
		launcher.setUseDaemonThreads(useDaemonThreads);
		return launcher;
	}
691300
public Map<String, Object> build() {
        final ImmutableMap.Builder<String, Object> builder = ImmutableMap.builder();
        //noinspection unchecked
        ofNullable(uploadOptions).map(x -> builder.putAll(x.build()));
        return builder.build();
    }