@@ -0,0 +1,2471 @@
+/*%0A * Copyright 2019-present Facebook, Inc.%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22); you may%0A * not use this file except in compliance with the License. You may obtain%0A * a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS, WITHOUT%0A * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the%0A * License for the specific language governing permissions and limitations%0A * under the License.%0A */%0Apackage com.facebook.buck.core.rules.actions.lib.args;%0A%0Aimport com.facebook.buck.core.artifact.Artifact;%0Aimport com.facebook.buck.core.artifact.ArtifactFilesystem;%0Aimport com.facebook.buck.core.rulekey.AddsToRuleKey;%0Aimport java.util.stream.Stream;%0A%0A/**%0A * Container for a list of objects that can be stringified into command line arguments for an action%0A * that executes a program.%0A *%0A * %3Cp%3EIn the future this will also let us more efficiently concatenate command line arguments that%0A * are passed around as providers, as the %7B@link CommandLineArgs%7D objects may store the immutable%0A * objects more efficiently, and just construct a stream to interate over those internal%0A * collections.%0A */%0Apublic interface CommandLineArgs extends AddsToRuleKey %7B%0A%0A  /**%0A   * Get a stream of strings that can be used to execute a program, utilizing information that is%0A   * only known at action execution time.%0A   *%0A   * @param filesystem the %7B@link ArtifactFilesystem%7D that is required to stringify %7B@link Artifact%7D%0A   *     objects%0A   * @return a stream of stringified command line arguments%0A   * @throws CommandLineArgException One of the objects contained in the backing structure was not%0A   *     of a valid type to be considered a command line argument. See %7B@link%0A   *     CommandLineArgStringifier%7D%0A   */%0A  Stream%3CString%3E getStrings(ArtifactFilesystem filesystem) throws CommandLineArgException;%0A%0A  /**%0A   * Get the approximate number of arguments that will be returned for %7B@link%0A   * #getStrings(ArtifactFilesystem)%7D%0A   *%0A   * %3Cp%3EThis can be handy to pre-size destination collections%0A   *%0A   * @return the approximate number of arguments. If retrieving the accurate count is efficient, a%0A   *     correct number is preferred. However if getting a correct number is impossible or%0A   *     expensive, an approximation is acceptable.%0A   */%0A  int getEstimatedArgsCount();%0A%7D%0A

Add CommandLineArgs interface