diff options
author | 2016-07-07 21:55:34 +0000 | |
---|---|---|
committer | 2016-07-08 08:50:40 +0000 | |
commit | ef4c16ca9eb0c1b7939b9487e0a59cc76d746750 (patch) | |
tree | 9c54e0fac61341526379a8fd22e696b2111a3c7e /src/main/java | |
parent | 7823502d2c012b4ee9d1eae63ca9bf4124d06806 (diff) |
Open-source ProtoSupportDataProvider.
--
MOS_MIGRATED_REVID=126850134
Diffstat (limited to 'src/main/java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSupportDataProvider.java | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSupportDataProvider.java b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSupportDataProvider.java new file mode 100644 index 0000000000..be914b547d --- /dev/null +++ b/src/main/java/com/google/devtools/build/lib/rules/proto/ProtoSupportDataProvider.java @@ -0,0 +1,39 @@ +// Copyright 2016 The Bazel Authors. All rights reserved. +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +package com.google.devtools.build.lib.rules.proto; + +import com.google.devtools.build.lib.analysis.TransitiveInfoProvider; +import com.google.devtools.build.lib.concurrent.ThreadSafety.Immutable; + +/** + * Provider that returns SupportData from proto_library used by language-specific protobuf + * generators. + */ +@Immutable +public final class ProtoSupportDataProvider implements TransitiveInfoProvider { + + private final SupportData supportData; + + public ProtoSupportDataProvider(SupportData supportData) { + this.supportData = supportData; + } + + /** + * Returns supportData created inside of ProtoLibrary. + */ + public SupportData getSupportData() { + return supportData; + } +} |