@@ -0,0 +1,2234 @@
+/*%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.cxx.toolchain.nativelink;%0A%0Aimport com.facebook.buck.core.model.BuildTarget;%0Aimport com.facebook.buck.core.rules.ActionGraphBuilder;%0Aimport com.facebook.buck.core.sourcepath.resolver.SourcePathResolver;%0Aimport com.google.common.collect.ImmutableList;%0Aimport java.nio.file.Path;%0Aimport java.util.Optional;%0A%0A/** An implementation of %7B@link NativeLinkTarget%7D where the behavior is fixed when created. */%0Apublic final class NativeLinkTargetInfo implements NativeLinkTarget %7B%0A  private final BuildTarget target;%0A  private final NativeLinkTargetMode targetMode;%0A  private final ImmutableList%3CNativeLinkable%3E linkableDeps;%0A  private final NativeLinkableInput linkableInput;%0A%0A  public NativeLinkTargetInfo(%0A      BuildTarget target,%0A      NativeLinkTargetMode targetMode,%0A      ImmutableList%3CNativeLinkable%3E linkableDeps,%0A      NativeLinkableInput linkableInput) %7B%0A    this.target = target;%0A    this.targetMode = targetMode;%0A    this.linkableDeps = linkableDeps;%0A    this.linkableInput = linkableInput;%0A  %7D%0A%0A  @Override%0A  public BuildTarget getBuildTarget() %7B%0A    return target;%0A  %7D%0A%0A  @Override%0A  public NativeLinkTargetMode getNativeLinkTargetMode() %7B%0A    return targetMode;%0A  %7D%0A%0A  @Override%0A  public Iterable%3C? extends NativeLinkable%3E getNativeLinkTargetDeps(%0A      ActionGraphBuilder graphBuilder) %7B%0A    return linkableDeps;%0A  %7D%0A%0A  @Override%0A  public NativeLinkableInput getNativeLinkTargetInput(%0A      ActionGraphBuilder graphBuilder, SourcePathResolver pathResolver) %7B%0A    return linkableInput;%0A  %7D%0A%0A  @Override%0A  public Optional%3CPath%3E getNativeLinkTargetOutputPath() %7B%0A    return Optional.empty();%0A  %7D%0A%7D%0A

Add NativeLinkTargetInfo