1 /*
2  * Copyright (C) 2019 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package com.android.codegentest;
18 
19 import android.os.Parcelable;
20 
21 import com.android.internal.util.DataClass;
22 
23 /**
24  * @see HierrarchicalDataClassChild
25  */
26 @DataClass(
27         genConstructor = false,
28         genSetters = true)
29 public class HierrarchicalDataClassBase implements Parcelable {
30 
31     private int mBaseData;
32 
33 
34 
35     // Code below generated by codegen v1.0.23.
36     //
37     // DO NOT MODIFY!
38     // CHECKSTYLE:OFF Generated code
39     //
40     // To regenerate run:
41     // $ codegen $ANDROID_BUILD_TOP/frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java
42     //
43     // To exclude the generated code from IntelliJ auto-formatting enable (one-time):
44     //   Settings > Editor > Code Style > Formatter Control
45     //@formatter:off
46 
47 
48     @DataClass.Generated.Member
getBaseData()49     public int getBaseData() {
50         return mBaseData;
51     }
52 
53     @DataClass.Generated.Member
setBaseData( int value)54     public @android.annotation.NonNull HierrarchicalDataClassBase setBaseData( int value) {
55         mBaseData = value;
56         return this;
57     }
58 
59     @Override
60     @DataClass.Generated.Member
writeToParcel(@ndroid.annotation.NonNull android.os.Parcel dest, int flags)61     public void writeToParcel(@android.annotation.NonNull android.os.Parcel dest, int flags) {
62         // You can override field parcelling by defining methods like:
63         // void parcelFieldName(Parcel dest, int flags) { ... }
64 
65         dest.writeInt(mBaseData);
66     }
67 
68     @Override
69     @DataClass.Generated.Member
describeContents()70     public int describeContents() { return 0; }
71 
72     /** @hide */
73     @SuppressWarnings({"unchecked", "RedundantCast"})
74     @DataClass.Generated.Member
HierrarchicalDataClassBase(@ndroid.annotation.NonNull android.os.Parcel in)75     protected HierrarchicalDataClassBase(@android.annotation.NonNull android.os.Parcel in) {
76         // You can override field unparcelling by defining methods like:
77         // static FieldType unparcelFieldName(Parcel in) { ... }
78 
79         int baseData = in.readInt();
80 
81         this.mBaseData = baseData;
82 
83         // onConstructed(); // You can define this method to get a callback
84     }
85 
86     @DataClass.Generated.Member
87     public static final @android.annotation.NonNull Parcelable.Creator<HierrarchicalDataClassBase> CREATOR
88             = new Parcelable.Creator<HierrarchicalDataClassBase>() {
89         @Override
90         public HierrarchicalDataClassBase[] newArray(int size) {
91             return new HierrarchicalDataClassBase[size];
92         }
93 
94         @Override
95         public HierrarchicalDataClassBase createFromParcel(@android.annotation.NonNull android.os.Parcel in) {
96             return new HierrarchicalDataClassBase(in);
97         }
98     };
99 
100     @DataClass.Generated(
101             time = 1616541542813L,
102             codegenVersion = "1.0.23",
103             sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java",
104             inputSignatures = "private  int mBaseData\nclass HierrarchicalDataClassBase extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstructor=false, genSetters=true)")
105     @Deprecated
__metadata()106     private void __metadata() {}
107 
108 
109     //@formatter:on
110     // End of generated code
111 
112 }
113