blob: eb33eb178704e3138ee8cd4dabbb6395cbb0c3be [file] [log] [blame]
lberki1161e732019-02-18 05:07:04 -08001// Copyright 2019 The Bazel Authors. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package com.google.devtools.build.lib.analysis;
16
17import com.google.devtools.build.lib.analysis.configuredtargets.AbstractConfiguredTarget;
18import com.google.devtools.build.lib.cmdline.Label;
19import com.google.devtools.build.lib.collect.nestedset.NestedSetBuilder;
20import com.google.devtools.build.lib.collect.nestedset.Order;
21import com.google.devtools.build.lib.packages.InfoInterface;
22import com.google.devtools.build.lib.packages.Provider;
23import com.google.devtools.build.lib.skyframe.BuildConfigurationValue;
24import javax.annotation.Nullable;
25
26/** A configured target that is empty. */
27public class EmptyConfiguredTarget extends AbstractConfiguredTarget {
28 public EmptyConfiguredTarget(Label label, BuildConfigurationValue.Key configurationKey) {
29 super(label, configurationKey, NestedSetBuilder.emptySet(Order.STABLE_ORDER));
30 }
31
32 @Nullable
33 @Override
34 protected InfoInterface rawGetSkylarkProvider(Provider.Key providerKey) {
35 return null;
36 }
37
38 @Override
39 protected Object rawGetSkylarkProvider(String providerKey) {
40 return null;
41 }
janakr02be4c52019-03-17 20:33:11 -070042
43 @Override
44 public String toString() {
45 return "Empty" + super.toString();
46 }
lberki1161e732019-02-18 05:07:04 -080047}