Returns a {@link SourceBuilder}. {@code env} will be inspected for potential import collisions.
If {@code features} is not null, it will be used instead of those deduced from {@code env}.
556997
public static SourceBuilder forEnvironment(ProcessingEnvironment env, FeatureSet features) {
    return new SourceBuilder(
        new CompilerReflection(env.getElementUtils()),
        Optional.ofNullable(features).orElseGet(() -> new EnvironmentFeatureSet(env)));
  }
801659
public static PropertiesBuilder builder(KnowledgeComponentImplementationModel implementationModel) {
        PropertiesModel propertiesModel = null;
        if (implementationModel != null) {
            propertiesModel = implementationModel.getProperties();
        }
        return new PropertiesBuilder(propertiesModel);
    }
761898
public GitConfigurationSource build() {
    return new GitConfigurationSource(repositoryURI, tmpPath, tmpRepoPrefix, branchResolver, pathResolver,
        configFilesProvider, propertiesProviderSelector);
  }
839438
def _POInitBuilderWrapper(env, target=None, source=_null, **kw):
  
  if source is _null:
    if 'POTDOMAIN' in kw:
      domain = kw['POTDOMAIN']
    elif 'POTDOMAIN' in env:
      domain = env['POTDOMAIN']
    else:
      domain = 'messages'
    source = [ domain ] # NOTE: Suffix shall be appended automatically
  return env._POInitBuilder(target, source, **kw)
59024
public Builder toBuilder() {
		return builder(_version, _creator)
			.metadata(_metadata)
			.wayPoints(_wayPoints)
			.routes(_routes)
			.tracks(_tracks);
	}
983206
public AbstractBuilder getMethodBuilder(ClassWriter classWriter)
           throws Exception {
        return MethodBuilder.getInstance(context,
            classWriter.getClassDoc(),
            writerFactory.getMethodWriter(classWriter));
    }
1126216
public static Builder builder() {
    return new AutoValue_Source.Builder()
        .setPath(DEV_NULL)
        .setCode("")
        .setOriginalCodeSupplier(null)
        .setSourceMap("")
        .setSourceUrl("")
        .setSourceMappingUrl("")
        .setRuntimes(ImmutableSet.of())
        .setLoadFlags(ImmutableMap.of())
        .setEstimatedSize(0);
  }
745942
private void generateImmutableToBuilder() {
        if (data.isBuilderGenerated()) {
            if (data.isConstructable()) {
                List<PropertyGen> nonDerived = nonDerivedProperties();
                if (nonDerived.size() > 0 || !data.isTypeFinal()) {
                    addLine(1, "/**");
                    addLine(1, " * Returns a builder that allows this bean to be mutated.");
                    addLine(1, " * @return the mutable builder, not null");
                    addLine(1, " */");
                    if (data.isRootClass() == false) {
                        addLine(1, "@Override");
                    }
                    addLine(1, data.getEffectiveBuilderScope() + "Builder" + data.getTypeGenericName(true) + " toBuilder() {");
                    addLine(2, "return new Builder" + data.getTypeGenericDiamond() + "(this);");
                    addLine(1, "}");
                    addBlankLine();
                }
            } else {
                addLine(1, "/**");
                addLine(1, " * Returns a builder that allows this bean to be mutated.");
                addLine(1, " * @return the mutable builder, not null");
                addLine(1, " */");
                if (data.isRootClass() == false) {
                    addLine(1, "@Override");
                }
                addLine(1, "public abstract Builder" + data.getTypeGenericName(true) + " toBuilder();");
                addBlankLine();
            }
        }
    }
1109408
public Feature transform(Source input) throws TransformationException {
        if (input == null) {
            return null;
        } else {
            EntityClassReader reader = EntityClassReader.getClassReaderFor(input.getClass());
            try {
                return reader.asFeature(input);
            } catch (InvalidObjectReaderException e) {
                // Can't happen!
                throw new TransformationException("Transformation failed", e);
            }
        }
    }
676995
protected BeanDefinitionBuilder getApiHelperBeanDefinitionBuilder(Map<String, Object> allAttributes)
	{
		return BeanDefinitionBuilder.genericBeanDefinition(apiHelperClass)
				.addConstructorArgReference("usersConnectionRepository")
				.addConstructorArgReference("userIdSource");
	}
962372
public AbstractBuilder getConstructorBuilder(ClassWriter classWriter)
            throws Exception {
        return ConstructorBuilder.getInstance(context,
            classWriter.getClassDoc(),
            writerFactory.getConstructorWriter(classWriter));
    }
732804
@CheckReturnValue
  public static Description.Builder buildDescriptionFromChecker(
      DiagnosticPosition position, BugChecker checker) {
    return Description.builder(
        position,
        checker.canonicalName(),
        checker.linkUrl(),
        checker.defaultSeverity(),
        checker.message());
  }
789782
@SuppressWarnings("static-method")
	public void getImportedFeatures(List<Class<?>> features) {
		features.add(AtomicLongCastExtensions.class);
		features.add(AtomicIntegerCastExtensions.class);
		features.add(AtomicDoubleCastExtensions.class);
		features.add(BigIntegerCastExtensions.class);
		features.add(BigDecimalCastExtensions.class);
		features.add(NumberCastExtensions.class);
		features.add(PrimitiveByteCastExtensions.class);
		features.add(PrimitiveDoubleCastExtensions.class);
		features.add(PrimitiveFloatCastExtensions.class);
		features.add(PrimitiveIntCastExtensions.class);
		features.add(PrimitiveLongCastExtensions.class);
		features.add(PrimitiveShortCastExtensions.class);
	}
611246
public ProcessBuilder getProcessBuilder()
	{
		if (spawned)
			return builder; // throw new IllegalStateException("Cannot call spawn twice!");

		if (runAs != null)
		{
			String command = cmd.get(0);

			if (command.charAt(0) == '-' && !SudoFeature.hasArgumentsEnd())
				throw new IllegalArgumentException("Command to runAs starts with - but this version of sudo does not support the -- argument end token: this command cannot, therefore, be executed securely. Command was: '" +
				                                   command + "'");

			// Pass the environment in through an "env" command:
			if (this.environment.size() > 0)
			{
				for (final String key : this.environment.keySet())
				{
					final String value = this.environment.get(key);

					final String var = key + "=" + value;

					addToCmd(0, var);
				}

				// cmd.add(0,"env");
				addToCmd(0, "env");
			}

			// cmd.add(0, "--"); // doesn't work everywhere
			// cmd.add(0, runAs);
			// cmd.add(0, "-u");
			// cmd.add(0, "-n"); // Never prompt for a password: we simply cannot provide one
			// cmd.add(0, "sudo");

			if (SudoFeature.hasArgumentsEnd())
				addToCmd(0, "--");

			// If possible tell sudo to run non-interactively
			String noninteractive = SudoFeature.hasNonInteractive() ? "-n" : null;

			if (this.runAs.equals(SUPERUSER_IDENTIFIER))
			{
				addToCmd(0, "sudo", noninteractive);
			}
			else
				addToCmd(0, "sudo", noninteractive, "-u", runAs);
		}
		else
		{
			builder.environment().putAll(this.environment);
		}

		spawned = true;

		if (log.isInfoEnabled())
		{
			log.info("ProcessBuilder created for command: " + join(" ", cmd));
		}

		return builder;
	}
1317319
public static FeatureCollection fromFeature(@NonNull Feature feature) {
    List<Feature> featureList = Arrays.asList(feature);
    return new FeatureCollection(TYPE, null, featureList);
  }
1277683
Optional<Builder> getBuilder() {
    Optional<TypeElement> builderTypeElement = Optional.empty();
    for (TypeElement containedClass : ElementFilter.typesIn(autoValueClass.getEnclosedElements())) {
      if (hasAnnotationMirror(containedClass, AUTO_VALUE_BUILDER_NAME)) {
        if (!CLASS_OR_INTERFACE.contains(containedClass.getKind())) {
          errorReporter.reportError(
              "@AutoValue.Builder can only apply to a class or an interface", containedClass);
        } else if (!containedClass.getModifiers().contains(Modifier.STATIC)) {
          errorReporter.reportError(
              "@AutoValue.Builder cannot be applied to a non-static class", containedClass);
        } else if (builderTypeElement.isPresent()) {
          errorReporter.reportError(
              autoValueClass + " already has a Builder: " + builderTypeElement.get(),
              containedClass);
        } else {
          builderTypeElement = Optional.of(containedClass);
        }
      }
    }

    if (builderTypeElement.isPresent()) {
      return builderFrom(builderTypeElement.get());
    } else {
      return Optional.empty();
    }
  }
1002786
def builder_from_source(source, filename, system_includes,
                        nonsystem_includes, quiet=False):
    
    return ASTBuilder(tokenize.get_tokens(source),
                      filename,
                      system_includes,
                      nonsystem_includes,
                      quiet=quiet)