Basic sanity-checking to ensure we can fulfil the &#64;FreeBuilder contract for this type.
17930
private void verifyType(TypeElement type, PackageElement pkg) throws CannotGenerateCodeException {
    if (pkg.isUnnamed()) {
      messager.printMessage(ERROR, "FreeBuilder does not support types in unnamed packages", type);
      throw new CannotGenerateCodeException();
    }
    switch (type.getNestingKind()) {
      case TOP_LEVEL:
        break;

      case MEMBER:
        if (!type.getModifiers().contains(Modifier.STATIC)) {
          messager.printMessage(
              ERROR,
              "Inner classes cannot be FreeBuilder types (did you forget the static keyword?)",
              type);
          throw new CannotGenerateCodeException();
        }

        if (type.getModifiers().contains(Modifier.PRIVATE)) {
          messager.printMessage(ERROR, "FreeBuilder types cannot be private", type);
          throw new CannotGenerateCodeException();
        }

        for (Element e = type.getEnclosingElement(); e != null; e = e.getEnclosingElement()) {
          if (e.getModifiers().contains(Modifier.PRIVATE)) {
            messager.printMessage(
                ERROR,
                "FreeBuilder types cannot be private, but enclosing type "
                    + e.getSimpleName() + " is inaccessible",
                type);
            throw new CannotGenerateCodeException();
          }
        }
        break;

      default:
        messager.printMessage(
            ERROR, "Only top-level or static nested types can be FreeBuilder types", type);
        throw new CannotGenerateCodeException();
    }
    switch (type.getKind()) {
      case ANNOTATION_TYPE:
        messager.printMessage(ERROR, "FreeBuilder does not support annotation types", type);
        throw new CannotGenerateCodeException();

      case CLASS:
        verifyTypeIsConstructible(type);
        break;

      case ENUM:
        messager.printMessage(ERROR, "FreeBuilder does not support enum types", type);
        throw new CannotGenerateCodeException();

      case INTERFACE:
        // Nothing extra needs to be checked on an interface
        break;

      default:
        throw new AssertionError("Unexpected element kind " + type.getKind());
    }
  }
881065
@Nonnull
	public static <T> BinaryOperator<T> binaryOperatorFrom(Consumer<BinaryOperatorBuilder<T>> buildingFunction) {
		BinaryOperatorBuilder builder = new BinaryOperatorBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1301843
private boolean verifyTypes()
    {
        SuccessAndResult<ThriftType> output = topologicalSort(thriftTypes, new Predicate<ThriftType>()
        {
            @Override
            public boolean apply(@Nullable ThriftType t)
            {
                ThriftProtocolType proto = checkNotNull(t).getProtocolType();
                if (proto == ThriftProtocolType.ENUM || proto == ThriftProtocolType.STRUCT) {
                    return verifyStruct(t, true);
                } else {
                    Preconditions.checkState(false, "Top-level non-enum and non-struct?");
                    return false;   // silence compiler
                }
            }
        });
        if (output.success) {
            thriftTypes = output.result;
            return true;
        } else {
            for (ThriftType t: output.result) {
                // we know it's gonna fail, we just want the precise error message
                verifyStruct(t, false);
            }
            return false;
        }
    }
838644
@Nonnull
	public static <T> LObjIntCharPredicate<T> objIntCharPredicateFrom(Consumer<LObjIntCharPredicateBuilder<T>> buildingFunction) {
		LObjIntCharPredicateBuilder builder = new LObjIntCharPredicateBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
378283
@Nonnull
	public static <T, R> LObjIntByteFunction<T, R> objIntByteFunctionFrom(Consumer<LObjIntByteFunctionBuilder<T, R>> buildingFunction) {
		LObjIntByteFunctionBuilder builder = new LObjIntByteFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
357940
@Nonnull
	public static <R> LBoolFunction<R> boolFunctionFrom(Consumer<LBoolFunctionBuilder<R>> buildingFunction) {
		LBoolFunctionBuilder builder = new LBoolFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
582591
@Nonnull
	public static <T1, T2, R> LBiObjFltFunction<T1, T2, R> biObjFltFunctionFrom(Consumer<LBiObjFltFunctionBuilder<T1, T2, R>> buildingFunction) {
		LBiObjFltFunctionBuilder builder = new LBiObjFltFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
499952
@Nonnull
	public static LByteBinaryOperator byteBinaryOperatorFrom(Consumer<LByteBinaryOperatorBuilder> buildingFunction) {
		LByteBinaryOperatorBuilder builder = new LByteBinaryOperatorBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
63630
function assertValidBuildType(value, name, description) {
  if ((value != common.DEBUG) && (value != common.RELEASE)) {
    throw new Error('Invalid build type: <' + value + '>, must be ' +
        'closureProBuild.DEBUG or closureProBuild.RELEASE');
  }
}
1138435
public <U extends T, A, B> OngoingMatchingC2<T, U, A, B> when(
      DecomposableMatchBuilder2<U, A, B> decomposableMatchBuilder) {
    return new OngoingMatchingC2<>(this, decomposableMatchBuilder.build());
  }
517062
@Nonnull
	public static <R> LByteFunction<R> byteFunctionFrom(Consumer<LByteFunctionBuilder<R>> buildingFunction) {
		LByteFunctionBuilder builder = new LByteFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
683110
@Nonnull
	public static LSrtUnaryOperator srtUnaryOperatorFrom(Consumer<LSrtUnaryOperatorBuilder> buildingFunction) {
		LSrtUnaryOperatorBuilder builder = new LSrtUnaryOperatorBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
523819
@Nonnull
	public static LByteToCharFunction byteToCharFunctionFrom(Consumer<LByteToCharFunctionBuilder> buildingFunction) {
		LByteToCharFunctionBuilder builder = new LByteToCharFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
855064
@Nonnull
	public static LLongToFltFunction longToFltFunctionFrom(Consumer<LLongToFltFunctionBuilder> buildingFunction) {
		LLongToFltFunctionBuilder builder = new LLongToFltFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
1183472
function build(validatorName, validatorOptions) {

    if (typeof validatorBuildersRepository[validatorName] !== 'function') {
        throw validatorName + ' does not exists. use addValidatorBuilder to add a new validation rule';
    }

    return validatorBuildersRepository[validatorName](ValidationState, stateEnum, validatorOptions);
}
485898
@Nonnull
	public static LBoolToLongFunction boolToLongFunctionFrom(Consumer<LBoolToLongFunctionBuilder> buildingFunction) {
		LBoolToLongFunctionBuilder builder = new LBoolToLongFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}
894104
@Nonnull
	public static <T> LToByteFunction<T> toByteFunctionFrom(Consumer<LToByteFunctionBuilder<T>> buildingFunction) {
		LToByteFunctionBuilder builder = new LToByteFunctionBuilder();
		buildingFunction.accept(builder);
		return builder.build();
	}