A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/protocolbuffers/protobuf/commit/31e57fc64a87d52a57d3373d7088c60a84ae79ff below:

Introduce a `Generated` annotation to eventually replace `javax.annot… · protocolbuffers/protobuf@31e57fc · GitHub

File tree Expand file treeCollapse file tree 3 files changed

+28

-0

lines changed

Filter options

Expand file treeCollapse file tree 3 files changed

+28

-0

lines changed Original file line number Diff line number Diff line change

@@ -47,6 +47,7 @@ LITE_SRCS = [

47 47

"src/main/java/com/google/protobuf/FieldSet.java",

48 48

"src/main/java/com/google/protobuf/FieldType.java",

49 49

"src/main/java/com/google/protobuf/FloatArrayList.java",

50 +

"src/main/java/com/google/protobuf/Generated.java",

50 51

"src/main/java/com/google/protobuf/GeneratedMessageInfoFactory.java",

51 52

"src/main/java/com/google/protobuf/GeneratedMessageLite.java",

52 53

"src/main/java/com/google/protobuf/InlineMe.java",

Original file line number Diff line number Diff line change

@@ -0,0 +1,24 @@

1 +

// Protocol Buffers - Google's data interchange format

2 +

// Copyright 2008 Google Inc. All rights reserved.

3 +

//

4 +

// Use of this source code is governed by a BSD-style

5 +

// license that can be found in the LICENSE file or at

6 +

// https://developers.google.com/open-source/licenses/bsd

7 + 8 +

package com.google.protobuf;

9 + 10 +

import static java.lang.annotation.ElementType.TYPE;

11 +

import static java.lang.annotation.RetentionPolicy.SOURCE;

12 + 13 +

import java.lang.annotation.Documented;

14 +

import java.lang.annotation.Retention;

15 +

import java.lang.annotation.Target;

16 + 17 +

/** Marks protobuf implementations generated by the {@code protoc} compiler. */

18 +

@Documented

19 +

// This is only used for static analysis at the compilation level, so SOURCE retention is used. It

20 +

// also must be SOURCE so that it does not force annotated classes to be forced into a main dex file

21 +

// in Android apks.

22 +

@Retention(SOURCE)

23 +

@Target(TYPE)

24 +

public @interface Generated {}

Original file line number Diff line number Diff line change

@@ -53,9 +53,12 @@ const char kThinSeparator[] =

53 53

void PrintGeneratedAnnotation(io::Printer* printer, char delimiter,

54 54

absl::string_view annotation_file,

55 55

Options options) {

56 +

printer->Print("@com.google.protobuf.Generated\n");

57 + 56 58

if (annotation_file.empty()) {

57 59

return;

58 60

}

61 +

// Print javax.annotation.Generated to support Kythe indexing

59 62

std::string ptemplate =

60 63

"@javax.annotation.Generated(value=\"protoc\", comments=\"annotations:";

61 64

ptemplate.push_back(delimiter);

You can’t perform that action at this time.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4