コード例 #1
0
ファイル: RedactedChild.java プロジェクト: 44kksharma/wire
 @Override
 public RedactedChild decode(ProtoReader reader) throws IOException {
   Builder builder = new Builder();
   long token = reader.beginMessage();
   for (int tag; (tag = reader.nextTag()) != -1; ) {
     switch (tag) {
       case 1:
         builder.a(ProtoAdapter.STRING.decode(reader));
         break;
       case 2:
         builder.b(Redacted.ADAPTER.decode(reader));
         break;
       case 3:
         builder.c(NotRedacted.ADAPTER.decode(reader));
         break;
       default:
         {
           FieldEncoding fieldEncoding = reader.peekFieldEncoding();
           Object value = fieldEncoding.rawProtoAdapter().decode(reader);
           builder.addUnknownField(tag, fieldEncoding, value);
         }
     }
   }
   reader.endMessage(token);
   return builder.build();
 }
コード例 #2
0
ファイル: RedactedChild.java プロジェクト: 44kksharma/wire
 @Override
 public RedactedChild redact(RedactedChild value) {
   Builder builder = value.newBuilder();
   if (builder.b != null) builder.b = Redacted.ADAPTER.redact(builder.b);
   if (builder.c != null) builder.c = NotRedacted.ADAPTER.redact(builder.c);
   builder.clearUnknownFields();
   return builder.build();
 }
コード例 #3
0
  private AvailableProviders(Builder builder) {
    /* block-local class not found */
    class Builder {}

    primary = Builder.a(builder);
    facebook = Builder.b(builder);
    adColony = Builder.c(builder);
  }
コード例 #4
0
ファイル: RedactedChild.java プロジェクト: 44kksharma/wire
 @Override
 public Builder newBuilder() {
   Builder builder = new Builder();
   builder.a = a;
   builder.b = b;
   builder.c = c;
   builder.addUnknownFields(unknownFields());
   return builder;
 }
コード例 #5
0
 private SearchAdRequest(Builder builder) {
   xl = Builder.a(builder);
   xm = Builder.b(builder);
   xn = Builder.c(builder);
   xo = Builder.d(builder);
   xp = Builder.e(builder);
   xq = Builder.f(builder);
   xr = Builder.g(builder);
   xs = Builder.h(builder);
   xt = Builder.i(builder);
   xu = Builder.j(builder);
   xv = Builder.k(builder);
   xw = Builder.l(builder);
   xx = Builder.m(builder);
   xy = Builder.n(builder);
   ld = new bg(Builder.o(builder), this);
 }
コード例 #6
0
 private AdFeedCard(Builder builder) {
   super(Builder.a(builder), Builder.b(builder), Builder.c(builder), Builder.d(builder));
   ad = Builder.e(builder);
   sponsorshipText = Builder.f(builder);
 }
コード例 #7
0
 private FollowAction(Builder builder) {
   following = Builder.a(builder);
   followData = Builder.b(builder);
 }