Loading tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java +3 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public class HierrarchicalDataClassBase implements Parcelable { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -98,8 +98,8 @@ public class HierrarchicalDataClassBase implements Parcelable { }; @DataClass.Generated( time = 1604522375155L, codegenVersion = "1.0.20", time = 1616541542813L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java", inputSignatures = "private int mBaseData\nclass HierrarchicalDataClassBase extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstructor=false, genSetters=true)") @Deprecated Loading tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java +3 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class HierrarchicalDataClassChild extends HierrarchicalDataClassBase { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -120,8 +120,8 @@ public class HierrarchicalDataClassChild extends HierrarchicalDataClassBase { }; @DataClass.Generated( time = 1604522376059L, codegenVersion = "1.0.20", time = 1616541543730L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java", inputSignatures = "private @android.annotation.NonNull java.lang.String mChildData\nclass HierrarchicalDataClassChild extends com.android.codegentest.HierrarchicalDataClassBase implements []\n@com.android.internal.util.DataClass(genParcelable=true, genConstructor=false, genSetters=true)") @Deprecated Loading tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java +3 −3 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class ParcelAllTheThingsDataClass implements Parcelable { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -412,8 +412,8 @@ public class ParcelAllTheThingsDataClass implements Parcelable { } @DataClass.Generated( time = 1604522374190L, codegenVersion = "1.0.20", time = 1616541541942L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java", inputSignatures = " @android.annotation.NonNull java.lang.String[] mStringArray\n @android.annotation.NonNull int[] mIntArray\n @android.annotation.NonNull java.util.List<java.lang.String> mStringList\n @android.annotation.NonNull java.util.Map<java.lang.String,com.android.codegentest.SampleWithCustomBuilder> mMap\n @android.annotation.NonNull java.util.Map<java.lang.String,java.lang.String> mStringMap\n @android.annotation.NonNull android.util.SparseArray<com.android.codegentest.SampleWithCustomBuilder> mSparseArray\n @android.annotation.NonNull android.util.SparseIntArray mSparseIntArray\n @java.lang.SuppressWarnings @android.annotation.Nullable java.lang.Boolean mNullableBoolean\nclass ParcelAllTheThingsDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genAidl=false, genToString=true)") @Deprecated Loading tests/Codegen/src/com/android/codegentest/SampleDataClass.java +120 −10 Original line number Diff line number Diff line Loading @@ -23,8 +23,11 @@ import android.annotation.Size; import android.annotation.StringDef; import android.annotation.StringRes; import android.annotation.UserIdInt; import android.companion.ICompanionDeviceManager; import android.content.pm.PackageManager; import android.net.LinkAddress; import android.os.Binder; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import android.view.accessibility.AccessibilityNodeInfo; Loading Loading @@ -281,6 +284,16 @@ public final class SampleDataClass implements Parcelable { private float[] mCoords = new float[] {0f, 0f}; /** * Binder types are also supported */ private @NonNull IBinder mToken = new Binder(); /** * AIDL interface types are also supported */ private @Nullable ICompanionDeviceManager mIPCInterface = null; /** * Manually declaring any method that would otherwise be generated suppresses its generation, * allowing for fine-grained overrides of the generated behavior. Loading Loading @@ -344,7 +357,7 @@ public final class SampleDataClass implements Parcelable { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -492,6 +505,10 @@ public final class SampleDataClass implements Parcelable { * * Validation annotations following {@link Each} annotation, will be applied for each * array/collection element instead. * @param token * Binder types are also supported * @param iPCInterface * AIDL interface types are also supported */ @DataClass.Generated.Member public SampleDataClass( Loading @@ -514,7 +531,9 @@ public final class SampleDataClass implements Parcelable { @Nullable LinkAddress[] linkAddresses5, @StringRes int stringRes, @android.annotation.IntRange(from = 0, to = 6) int dayOfWeek, @Size(2) @NonNull @FloatRange(from = 0f) float[] coords) { @Size(2) @NonNull @FloatRange(from = 0f) float[] coords, @NonNull IBinder token, @Nullable ICompanionDeviceManager iPCInterface) { this.mNum = num; this.mNum2 = num2; this.mNum4 = num4; Loading Loading @@ -597,6 +616,10 @@ public final class SampleDataClass implements Parcelable { "from", 0f); } this.mToken = token; AnnotationValidations.validate( NonNull.class, null, mToken); this.mIPCInterface = iPCInterface; onConstructed(); } Loading Loading @@ -796,6 +819,22 @@ public final class SampleDataClass implements Parcelable { return mCoords; } /** * Binder types are also supported */ @DataClass.Generated.Member public @NonNull IBinder getToken() { return mToken; } /** * AIDL interface types are also supported */ @DataClass.Generated.Member public @Nullable ICompanionDeviceManager getIPCInterface() { return mIPCInterface; } /** * When using transient fields for caching it's often also a good idea to initialize them * lazily. Loading Loading @@ -1089,6 +1128,26 @@ public final class SampleDataClass implements Parcelable { return this; } /** * Binder types are also supported */ @DataClass.Generated.Member public @NonNull SampleDataClass setToken(@NonNull IBinder value) { mToken = value; AnnotationValidations.validate( NonNull.class, null, mToken); return this; } /** * AIDL interface types are also supported */ @DataClass.Generated.Member public @NonNull SampleDataClass setIPCInterface(@NonNull ICompanionDeviceManager value) { mIPCInterface = value; return this; } @Override @DataClass.Generated.Member public String toString() { Loading @@ -1115,7 +1174,9 @@ public final class SampleDataClass implements Parcelable { "linkAddresses5 = " + java.util.Arrays.toString(mLinkAddresses5) + ", " + "stringRes = " + mStringRes + ", " + "dayOfWeek = " + mDayOfWeek + ", " + "coords = " + java.util.Arrays.toString(mCoords) + "coords = " + java.util.Arrays.toString(mCoords) + ", " + "token = " + mToken + ", " + "iPCInterface = " + mIPCInterface + " }"; } Loading Loading @@ -1151,7 +1212,9 @@ public final class SampleDataClass implements Parcelable { && java.util.Arrays.equals(mLinkAddresses5, that.mLinkAddresses5) && mStringRes == that.mStringRes && mDayOfWeek == that.mDayOfWeek && java.util.Arrays.equals(mCoords, that.mCoords); && java.util.Arrays.equals(mCoords, that.mCoords) && Objects.equals(mToken, that.mToken) && Objects.equals(mIPCInterface, that.mIPCInterface); } @Override Loading Loading @@ -1181,6 +1244,8 @@ public final class SampleDataClass implements Parcelable { _hash = 31 * _hash + mStringRes; _hash = 31 * _hash + mDayOfWeek; _hash = 31 * _hash + java.util.Arrays.hashCode(mCoords); _hash = 31 * _hash + Objects.hashCode(mToken); _hash = 31 * _hash + Objects.hashCode(mIPCInterface); return _hash; } Loading Loading @@ -1208,6 +1273,8 @@ public final class SampleDataClass implements Parcelable { actionInt.acceptInt(this, "stringRes", mStringRes); actionInt.acceptInt(this, "dayOfWeek", mDayOfWeek); actionObject.acceptObject(this, "coords", mCoords); actionObject.acceptObject(this, "token", mToken); actionObject.acceptObject(this, "iPCInterface", mIPCInterface); } /** @deprecated May cause boxing allocations - use with caution! */ Loading @@ -1234,6 +1301,8 @@ public final class SampleDataClass implements Parcelable { action.acceptObject(this, "stringRes", mStringRes); action.acceptObject(this, "dayOfWeek", mDayOfWeek); action.acceptObject(this, "coords", mCoords); action.acceptObject(this, "token", mToken); action.acceptObject(this, "iPCInterface", mIPCInterface); } @DataClass.Generated.Member Loading Loading @@ -1269,6 +1338,7 @@ public final class SampleDataClass implements Parcelable { if (mOtherParcelable != null) flg |= 0x40; if (mLinkAddresses4 != null) flg |= 0x800; if (mLinkAddresses5 != null) flg |= 0x10000; if (mIPCInterface != null) flg |= 0x200000; dest.writeLong(flg); dest.writeInt(mNum); dest.writeInt(mNum2); Loading @@ -1290,6 +1360,8 @@ public final class SampleDataClass implements Parcelable { dest.writeInt(mStringRes); dest.writeInt(mDayOfWeek); dest.writeFloatArray(mCoords); dest.writeStrongBinder(mToken); if (mIPCInterface != null) dest.writeStrongInterface(mIPCInterface); } @Override Loading Loading @@ -1326,6 +1398,8 @@ public final class SampleDataClass implements Parcelable { int stringRes = in.readInt(); int dayOfWeek = in.readInt(); float[] coords = in.createFloatArray(); IBinder token = (IBinder) in.readStrongBinder(); ICompanionDeviceManager iPCInterface = (flg & 0x200000) == 0 ? null : ICompanionDeviceManager.Stub.asInterface(in.readStrongBinder()); this.mNum = num; this.mNum2 = num2; Loading Loading @@ -1409,6 +1483,10 @@ public final class SampleDataClass implements Parcelable { "from", 0f); } this.mToken = token; AnnotationValidations.validate( NonNull.class, null, mToken); this.mIPCInterface = iPCInterface; onConstructed(); } Loading Loading @@ -1454,6 +1532,8 @@ public final class SampleDataClass implements Parcelable { private @StringRes int mStringRes; private @android.annotation.IntRange(from = 0, to = 6) int mDayOfWeek; private @Size(2) @NonNull @FloatRange(from = 0f) float[] mCoords; private @NonNull IBinder mToken; private @Nullable ICompanionDeviceManager mIPCInterface; private long mBuilderFieldsSet = 0L; Loading Loading @@ -1794,10 +1874,32 @@ public final class SampleDataClass implements Parcelable { return this; } /** * Binder types are also supported */ @DataClass.Generated.Member public @NonNull Builder setToken(@NonNull IBinder value) { checkNotUsed(); mBuilderFieldsSet |= 0x100000; mToken = value; return this; } /** * AIDL interface types are also supported */ @DataClass.Generated.Member public @NonNull Builder setIPCInterface(@NonNull ICompanionDeviceManager value) { checkNotUsed(); mBuilderFieldsSet |= 0x200000; mIPCInterface = value; return this; } /** Builds the instance. This builder should not be touched after calling this! */ public @NonNull SampleDataClass build() { checkNotUsed(); mBuilderFieldsSet |= 0x100000; // Mark builder used mBuilderFieldsSet |= 0x400000; // Mark builder used if ((mBuilderFieldsSet & 0x10) == 0) { mName2 = "Bob"; Loading Loading @@ -1841,6 +1943,12 @@ public final class SampleDataClass implements Parcelable { if ((mBuilderFieldsSet & 0x80000) == 0) { mCoords = new float[] { 0f, 0f }; } if ((mBuilderFieldsSet & 0x100000) == 0) { mToken = new Binder(); } if ((mBuilderFieldsSet & 0x200000) == 0) { mIPCInterface = null; } SampleDataClass o = new SampleDataClass( mNum, mNum2, Loading @@ -1861,12 +1969,14 @@ public final class SampleDataClass implements Parcelable { mLinkAddresses5, mStringRes, mDayOfWeek, mCoords); mCoords, mToken, mIPCInterface); return o; } private void checkNotUsed() { if ((mBuilderFieldsSet & 0x100000) != 0) { if ((mBuilderFieldsSet & 0x400000) != 0) { throw new IllegalStateException( "This Builder should not be reused. Use a new Builder instance instead"); } Loading @@ -1874,10 +1984,10 @@ public final class SampleDataClass implements Parcelable { } @DataClass.Generated( time = 1604522372172L, codegenVersion = "1.0.20", time = 1616541539978L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleDataClass.java", inputSignatures = "public static final java.lang.String STATE_NAME_UNDEFINED\npublic static final java.lang.String STATE_NAME_ON\npublic static final java.lang.String STATE_NAME_OFF\npublic static final int STATE_ON\npublic static final int STATE_OFF\npublic static final int STATE_UNDEFINED\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_MANUAL_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_COMPATIBILITY_MODE_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_AUGMENTED_REQUEST\nprivate int mNum\nprivate int mNum2\nprivate int mNum4\nprivate @android.annotation.Nullable java.lang.String mName\nprivate @android.annotation.NonNull java.lang.String mName2\nprivate @android.annotation.NonNull java.lang.String mName4\nprivate @android.annotation.Nullable android.view.accessibility.AccessibilityNodeInfo mOtherParcelable\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.codegentest.MyDateParcelling.class) @android.annotation.NonNull java.util.Date mDate\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForPattern.class) @android.annotation.NonNull java.util.regex.Pattern mPattern\nprivate @android.annotation.NonNull java.util.List<android.net.LinkAddress> mLinkAddresses2\nprivate @com.android.internal.util.DataClass.PluralOf(\"linkAddress\") @android.annotation.NonNull java.util.ArrayList<android.net.LinkAddress> mLinkAddresses\nprivate @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses4\nprivate @com.android.codegentest.SampleDataClass.StateName @android.annotation.NonNull java.lang.String mStateName\nprivate @com.android.codegentest.SampleDataClass.RequestFlags int mFlags\nprivate @com.android.codegentest.SampleDataClass.State int mState\npublic @android.annotation.NonNull java.lang.CharSequence charSeq\nprivate final @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses5\nprivate transient android.net.LinkAddress[] mLinkAddresses6\ntransient int[] mTmpStorage\nprivate @android.annotation.StringRes int mStringRes\nprivate @android.annotation.IntRange int mDayOfWeek\nprivate @android.annotation.Size @android.annotation.NonNull @com.android.internal.util.DataClass.Each @android.annotation.FloatRange float[] mCoords\nprivate static java.lang.String defaultName4()\nprivate int[] lazyInitTmpStorage()\npublic android.net.LinkAddress[] getLinkAddresses4()\nprivate boolean patternEquals(java.util.regex.Pattern)\nprivate int patternHashCode()\nprivate void onConstructed()\npublic void dump(java.io.PrintWriter)\nclass SampleDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genConstructor=true, genEqualsHashCode=true, genToString=true, genForEachField=true, genSetters=true)") inputSignatures = "public static final java.lang.String STATE_NAME_UNDEFINED\npublic static final java.lang.String STATE_NAME_ON\npublic static final java.lang.String STATE_NAME_OFF\npublic static final int STATE_ON\npublic static final int STATE_OFF\npublic static final int STATE_UNDEFINED\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_MANUAL_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_COMPATIBILITY_MODE_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_AUGMENTED_REQUEST\nprivate int mNum\nprivate int mNum2\nprivate int mNum4\nprivate @android.annotation.Nullable java.lang.String mName\nprivate @android.annotation.NonNull java.lang.String mName2\nprivate @android.annotation.NonNull java.lang.String mName4\nprivate @android.annotation.Nullable android.view.accessibility.AccessibilityNodeInfo mOtherParcelable\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.codegentest.MyDateParcelling.class) @android.annotation.NonNull java.util.Date mDate\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForPattern.class) @android.annotation.NonNull java.util.regex.Pattern mPattern\nprivate @android.annotation.NonNull java.util.List<android.net.LinkAddress> mLinkAddresses2\nprivate @com.android.internal.util.DataClass.PluralOf(\"linkAddress\") @android.annotation.NonNull java.util.ArrayList<android.net.LinkAddress> mLinkAddresses\nprivate @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses4\nprivate @com.android.codegentest.SampleDataClass.StateName @android.annotation.NonNull java.lang.String mStateName\nprivate @com.android.codegentest.SampleDataClass.RequestFlags int mFlags\nprivate @com.android.codegentest.SampleDataClass.State int mState\npublic @android.annotation.NonNull java.lang.CharSequence charSeq\nprivate final @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses5\nprivate transient android.net.LinkAddress[] mLinkAddresses6\ntransient int[] mTmpStorage\nprivate @android.annotation.StringRes int mStringRes\nprivate @android.annotation.IntRange int mDayOfWeek\nprivate @android.annotation.Size @android.annotation.NonNull @com.android.internal.util.DataClass.Each @android.annotation.FloatRange float[] mCoords\nprivate @android.annotation.NonNull android.os.IBinder mToken\nprivate @android.annotation.Nullable android.companion.ICompanionDeviceManager mIPCInterface\nprivate static java.lang.String defaultName4()\nprivate int[] lazyInitTmpStorage()\npublic android.net.LinkAddress[] getLinkAddresses4()\nprivate boolean patternEquals(java.util.regex.Pattern)\nprivate int patternHashCode()\nprivate void onConstructed()\npublic void dump(java.io.PrintWriter)\nclass SampleDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genConstructor=true, genEqualsHashCode=true, genToString=true, genForEachField=true, genSetters=true)") @Deprecated private void __metadata() {} Loading tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java +3 −3 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ public class SampleWithCustomBuilder implements Parcelable { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -253,8 +253,8 @@ public class SampleWithCustomBuilder implements Parcelable { } @DataClass.Generated( time = 1604522373190L, codegenVersion = "1.0.20", time = 1616541540898L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java", inputSignatures = " long delayAmount\n @android.annotation.NonNull java.util.concurrent.TimeUnit delayUnit\n long creationTimestamp\nprivate static java.util.concurrent.TimeUnit unparcelDelayUnit(android.os.Parcel)\nprivate void parcelDelayUnit(android.os.Parcel,int)\nclass SampleWithCustomBuilder extends java.lang.Object implements [android.os.Parcelable]\nabstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayAmount(long)\npublic abstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayUnit(java.util.concurrent.TimeUnit)\npublic com.android.codegentest.SampleWithCustomBuilder.Builder setDelay(long,java.util.concurrent.TimeUnit)\nclass BaseBuilder extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genBuilder=true, genAidl=false, genToString=true)\nabstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayAmount(long)\npublic abstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayUnit(java.util.concurrent.TimeUnit)\npublic com.android.codegentest.SampleWithCustomBuilder.Builder setDelay(long,java.util.concurrent.TimeUnit)\nclass BaseBuilder extends java.lang.Object implements []") @Deprecated Loading Loading
tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java +3 −3 Original line number Diff line number Diff line Loading @@ -32,7 +32,7 @@ public class HierrarchicalDataClassBase implements Parcelable { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -98,8 +98,8 @@ public class HierrarchicalDataClassBase implements Parcelable { }; @DataClass.Generated( time = 1604522375155L, codegenVersion = "1.0.20", time = 1616541542813L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassBase.java", inputSignatures = "private int mBaseData\nclass HierrarchicalDataClassBase extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genConstructor=false, genSetters=true)") @Deprecated Loading
tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java +3 −3 Original line number Diff line number Diff line Loading @@ -46,7 +46,7 @@ public class HierrarchicalDataClassChild extends HierrarchicalDataClassBase { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -120,8 +120,8 @@ public class HierrarchicalDataClassChild extends HierrarchicalDataClassBase { }; @DataClass.Generated( time = 1604522376059L, codegenVersion = "1.0.20", time = 1616541543730L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/HierrarchicalDataClassChild.java", inputSignatures = "private @android.annotation.NonNull java.lang.String mChildData\nclass HierrarchicalDataClassChild extends com.android.codegentest.HierrarchicalDataClassBase implements []\n@com.android.internal.util.DataClass(genParcelable=true, genConstructor=false, genSetters=true)") @Deprecated Loading
tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java +3 −3 Original line number Diff line number Diff line Loading @@ -54,7 +54,7 @@ public class ParcelAllTheThingsDataClass implements Parcelable { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -412,8 +412,8 @@ public class ParcelAllTheThingsDataClass implements Parcelable { } @DataClass.Generated( time = 1604522374190L, codegenVersion = "1.0.20", time = 1616541541942L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/ParcelAllTheThingsDataClass.java", inputSignatures = " @android.annotation.NonNull java.lang.String[] mStringArray\n @android.annotation.NonNull int[] mIntArray\n @android.annotation.NonNull java.util.List<java.lang.String> mStringList\n @android.annotation.NonNull java.util.Map<java.lang.String,com.android.codegentest.SampleWithCustomBuilder> mMap\n @android.annotation.NonNull java.util.Map<java.lang.String,java.lang.String> mStringMap\n @android.annotation.NonNull android.util.SparseArray<com.android.codegentest.SampleWithCustomBuilder> mSparseArray\n @android.annotation.NonNull android.util.SparseIntArray mSparseIntArray\n @java.lang.SuppressWarnings @android.annotation.Nullable java.lang.Boolean mNullableBoolean\nclass ParcelAllTheThingsDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genAidl=false, genToString=true)") @Deprecated Loading
tests/Codegen/src/com/android/codegentest/SampleDataClass.java +120 −10 Original line number Diff line number Diff line Loading @@ -23,8 +23,11 @@ import android.annotation.Size; import android.annotation.StringDef; import android.annotation.StringRes; import android.annotation.UserIdInt; import android.companion.ICompanionDeviceManager; import android.content.pm.PackageManager; import android.net.LinkAddress; import android.os.Binder; import android.os.IBinder; import android.os.Parcel; import android.os.Parcelable; import android.view.accessibility.AccessibilityNodeInfo; Loading Loading @@ -281,6 +284,16 @@ public final class SampleDataClass implements Parcelable { private float[] mCoords = new float[] {0f, 0f}; /** * Binder types are also supported */ private @NonNull IBinder mToken = new Binder(); /** * AIDL interface types are also supported */ private @Nullable ICompanionDeviceManager mIPCInterface = null; /** * Manually declaring any method that would otherwise be generated suppresses its generation, * allowing for fine-grained overrides of the generated behavior. Loading Loading @@ -344,7 +357,7 @@ public final class SampleDataClass implements Parcelable { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -492,6 +505,10 @@ public final class SampleDataClass implements Parcelable { * * Validation annotations following {@link Each} annotation, will be applied for each * array/collection element instead. * @param token * Binder types are also supported * @param iPCInterface * AIDL interface types are also supported */ @DataClass.Generated.Member public SampleDataClass( Loading @@ -514,7 +531,9 @@ public final class SampleDataClass implements Parcelable { @Nullable LinkAddress[] linkAddresses5, @StringRes int stringRes, @android.annotation.IntRange(from = 0, to = 6) int dayOfWeek, @Size(2) @NonNull @FloatRange(from = 0f) float[] coords) { @Size(2) @NonNull @FloatRange(from = 0f) float[] coords, @NonNull IBinder token, @Nullable ICompanionDeviceManager iPCInterface) { this.mNum = num; this.mNum2 = num2; this.mNum4 = num4; Loading Loading @@ -597,6 +616,10 @@ public final class SampleDataClass implements Parcelable { "from", 0f); } this.mToken = token; AnnotationValidations.validate( NonNull.class, null, mToken); this.mIPCInterface = iPCInterface; onConstructed(); } Loading Loading @@ -796,6 +819,22 @@ public final class SampleDataClass implements Parcelable { return mCoords; } /** * Binder types are also supported */ @DataClass.Generated.Member public @NonNull IBinder getToken() { return mToken; } /** * AIDL interface types are also supported */ @DataClass.Generated.Member public @Nullable ICompanionDeviceManager getIPCInterface() { return mIPCInterface; } /** * When using transient fields for caching it's often also a good idea to initialize them * lazily. Loading Loading @@ -1089,6 +1128,26 @@ public final class SampleDataClass implements Parcelable { return this; } /** * Binder types are also supported */ @DataClass.Generated.Member public @NonNull SampleDataClass setToken(@NonNull IBinder value) { mToken = value; AnnotationValidations.validate( NonNull.class, null, mToken); return this; } /** * AIDL interface types are also supported */ @DataClass.Generated.Member public @NonNull SampleDataClass setIPCInterface(@NonNull ICompanionDeviceManager value) { mIPCInterface = value; return this; } @Override @DataClass.Generated.Member public String toString() { Loading @@ -1115,7 +1174,9 @@ public final class SampleDataClass implements Parcelable { "linkAddresses5 = " + java.util.Arrays.toString(mLinkAddresses5) + ", " + "stringRes = " + mStringRes + ", " + "dayOfWeek = " + mDayOfWeek + ", " + "coords = " + java.util.Arrays.toString(mCoords) + "coords = " + java.util.Arrays.toString(mCoords) + ", " + "token = " + mToken + ", " + "iPCInterface = " + mIPCInterface + " }"; } Loading Loading @@ -1151,7 +1212,9 @@ public final class SampleDataClass implements Parcelable { && java.util.Arrays.equals(mLinkAddresses5, that.mLinkAddresses5) && mStringRes == that.mStringRes && mDayOfWeek == that.mDayOfWeek && java.util.Arrays.equals(mCoords, that.mCoords); && java.util.Arrays.equals(mCoords, that.mCoords) && Objects.equals(mToken, that.mToken) && Objects.equals(mIPCInterface, that.mIPCInterface); } @Override Loading Loading @@ -1181,6 +1244,8 @@ public final class SampleDataClass implements Parcelable { _hash = 31 * _hash + mStringRes; _hash = 31 * _hash + mDayOfWeek; _hash = 31 * _hash + java.util.Arrays.hashCode(mCoords); _hash = 31 * _hash + Objects.hashCode(mToken); _hash = 31 * _hash + Objects.hashCode(mIPCInterface); return _hash; } Loading Loading @@ -1208,6 +1273,8 @@ public final class SampleDataClass implements Parcelable { actionInt.acceptInt(this, "stringRes", mStringRes); actionInt.acceptInt(this, "dayOfWeek", mDayOfWeek); actionObject.acceptObject(this, "coords", mCoords); actionObject.acceptObject(this, "token", mToken); actionObject.acceptObject(this, "iPCInterface", mIPCInterface); } /** @deprecated May cause boxing allocations - use with caution! */ Loading @@ -1234,6 +1301,8 @@ public final class SampleDataClass implements Parcelable { action.acceptObject(this, "stringRes", mStringRes); action.acceptObject(this, "dayOfWeek", mDayOfWeek); action.acceptObject(this, "coords", mCoords); action.acceptObject(this, "token", mToken); action.acceptObject(this, "iPCInterface", mIPCInterface); } @DataClass.Generated.Member Loading Loading @@ -1269,6 +1338,7 @@ public final class SampleDataClass implements Parcelable { if (mOtherParcelable != null) flg |= 0x40; if (mLinkAddresses4 != null) flg |= 0x800; if (mLinkAddresses5 != null) flg |= 0x10000; if (mIPCInterface != null) flg |= 0x200000; dest.writeLong(flg); dest.writeInt(mNum); dest.writeInt(mNum2); Loading @@ -1290,6 +1360,8 @@ public final class SampleDataClass implements Parcelable { dest.writeInt(mStringRes); dest.writeInt(mDayOfWeek); dest.writeFloatArray(mCoords); dest.writeStrongBinder(mToken); if (mIPCInterface != null) dest.writeStrongInterface(mIPCInterface); } @Override Loading Loading @@ -1326,6 +1398,8 @@ public final class SampleDataClass implements Parcelable { int stringRes = in.readInt(); int dayOfWeek = in.readInt(); float[] coords = in.createFloatArray(); IBinder token = (IBinder) in.readStrongBinder(); ICompanionDeviceManager iPCInterface = (flg & 0x200000) == 0 ? null : ICompanionDeviceManager.Stub.asInterface(in.readStrongBinder()); this.mNum = num; this.mNum2 = num2; Loading Loading @@ -1409,6 +1483,10 @@ public final class SampleDataClass implements Parcelable { "from", 0f); } this.mToken = token; AnnotationValidations.validate( NonNull.class, null, mToken); this.mIPCInterface = iPCInterface; onConstructed(); } Loading Loading @@ -1454,6 +1532,8 @@ public final class SampleDataClass implements Parcelable { private @StringRes int mStringRes; private @android.annotation.IntRange(from = 0, to = 6) int mDayOfWeek; private @Size(2) @NonNull @FloatRange(from = 0f) float[] mCoords; private @NonNull IBinder mToken; private @Nullable ICompanionDeviceManager mIPCInterface; private long mBuilderFieldsSet = 0L; Loading Loading @@ -1794,10 +1874,32 @@ public final class SampleDataClass implements Parcelable { return this; } /** * Binder types are also supported */ @DataClass.Generated.Member public @NonNull Builder setToken(@NonNull IBinder value) { checkNotUsed(); mBuilderFieldsSet |= 0x100000; mToken = value; return this; } /** * AIDL interface types are also supported */ @DataClass.Generated.Member public @NonNull Builder setIPCInterface(@NonNull ICompanionDeviceManager value) { checkNotUsed(); mBuilderFieldsSet |= 0x200000; mIPCInterface = value; return this; } /** Builds the instance. This builder should not be touched after calling this! */ public @NonNull SampleDataClass build() { checkNotUsed(); mBuilderFieldsSet |= 0x100000; // Mark builder used mBuilderFieldsSet |= 0x400000; // Mark builder used if ((mBuilderFieldsSet & 0x10) == 0) { mName2 = "Bob"; Loading Loading @@ -1841,6 +1943,12 @@ public final class SampleDataClass implements Parcelable { if ((mBuilderFieldsSet & 0x80000) == 0) { mCoords = new float[] { 0f, 0f }; } if ((mBuilderFieldsSet & 0x100000) == 0) { mToken = new Binder(); } if ((mBuilderFieldsSet & 0x200000) == 0) { mIPCInterface = null; } SampleDataClass o = new SampleDataClass( mNum, mNum2, Loading @@ -1861,12 +1969,14 @@ public final class SampleDataClass implements Parcelable { mLinkAddresses5, mStringRes, mDayOfWeek, mCoords); mCoords, mToken, mIPCInterface); return o; } private void checkNotUsed() { if ((mBuilderFieldsSet & 0x100000) != 0) { if ((mBuilderFieldsSet & 0x400000) != 0) { throw new IllegalStateException( "This Builder should not be reused. Use a new Builder instance instead"); } Loading @@ -1874,10 +1984,10 @@ public final class SampleDataClass implements Parcelable { } @DataClass.Generated( time = 1604522372172L, codegenVersion = "1.0.20", time = 1616541539978L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleDataClass.java", inputSignatures = "public static final java.lang.String STATE_NAME_UNDEFINED\npublic static final java.lang.String STATE_NAME_ON\npublic static final java.lang.String STATE_NAME_OFF\npublic static final int STATE_ON\npublic static final int STATE_OFF\npublic static final int STATE_UNDEFINED\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_MANUAL_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_COMPATIBILITY_MODE_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_AUGMENTED_REQUEST\nprivate int mNum\nprivate int mNum2\nprivate int mNum4\nprivate @android.annotation.Nullable java.lang.String mName\nprivate @android.annotation.NonNull java.lang.String mName2\nprivate @android.annotation.NonNull java.lang.String mName4\nprivate @android.annotation.Nullable android.view.accessibility.AccessibilityNodeInfo mOtherParcelable\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.codegentest.MyDateParcelling.class) @android.annotation.NonNull java.util.Date mDate\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForPattern.class) @android.annotation.NonNull java.util.regex.Pattern mPattern\nprivate @android.annotation.NonNull java.util.List<android.net.LinkAddress> mLinkAddresses2\nprivate @com.android.internal.util.DataClass.PluralOf(\"linkAddress\") @android.annotation.NonNull java.util.ArrayList<android.net.LinkAddress> mLinkAddresses\nprivate @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses4\nprivate @com.android.codegentest.SampleDataClass.StateName @android.annotation.NonNull java.lang.String mStateName\nprivate @com.android.codegentest.SampleDataClass.RequestFlags int mFlags\nprivate @com.android.codegentest.SampleDataClass.State int mState\npublic @android.annotation.NonNull java.lang.CharSequence charSeq\nprivate final @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses5\nprivate transient android.net.LinkAddress[] mLinkAddresses6\ntransient int[] mTmpStorage\nprivate @android.annotation.StringRes int mStringRes\nprivate @android.annotation.IntRange int mDayOfWeek\nprivate @android.annotation.Size @android.annotation.NonNull @com.android.internal.util.DataClass.Each @android.annotation.FloatRange float[] mCoords\nprivate static java.lang.String defaultName4()\nprivate int[] lazyInitTmpStorage()\npublic android.net.LinkAddress[] getLinkAddresses4()\nprivate boolean patternEquals(java.util.regex.Pattern)\nprivate int patternHashCode()\nprivate void onConstructed()\npublic void dump(java.io.PrintWriter)\nclass SampleDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genConstructor=true, genEqualsHashCode=true, genToString=true, genForEachField=true, genSetters=true)") inputSignatures = "public static final java.lang.String STATE_NAME_UNDEFINED\npublic static final java.lang.String STATE_NAME_ON\npublic static final java.lang.String STATE_NAME_OFF\npublic static final int STATE_ON\npublic static final int STATE_OFF\npublic static final int STATE_UNDEFINED\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_MANUAL_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_COMPATIBILITY_MODE_REQUEST\npublic static final @com.android.codegentest.SampleDataClass.RequestFlags int FLAG_AUGMENTED_REQUEST\nprivate int mNum\nprivate int mNum2\nprivate int mNum4\nprivate @android.annotation.Nullable java.lang.String mName\nprivate @android.annotation.NonNull java.lang.String mName2\nprivate @android.annotation.NonNull java.lang.String mName4\nprivate @android.annotation.Nullable android.view.accessibility.AccessibilityNodeInfo mOtherParcelable\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.codegentest.MyDateParcelling.class) @android.annotation.NonNull java.util.Date mDate\nprivate @com.android.internal.util.DataClass.ParcelWith(com.android.internal.util.Parcelling.BuiltIn.ForPattern.class) @android.annotation.NonNull java.util.regex.Pattern mPattern\nprivate @android.annotation.NonNull java.util.List<android.net.LinkAddress> mLinkAddresses2\nprivate @com.android.internal.util.DataClass.PluralOf(\"linkAddress\") @android.annotation.NonNull java.util.ArrayList<android.net.LinkAddress> mLinkAddresses\nprivate @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses4\nprivate @com.android.codegentest.SampleDataClass.StateName @android.annotation.NonNull java.lang.String mStateName\nprivate @com.android.codegentest.SampleDataClass.RequestFlags int mFlags\nprivate @com.android.codegentest.SampleDataClass.State int mState\npublic @android.annotation.NonNull java.lang.CharSequence charSeq\nprivate final @android.annotation.Nullable android.net.LinkAddress[] mLinkAddresses5\nprivate transient android.net.LinkAddress[] mLinkAddresses6\ntransient int[] mTmpStorage\nprivate @android.annotation.StringRes int mStringRes\nprivate @android.annotation.IntRange int mDayOfWeek\nprivate @android.annotation.Size @android.annotation.NonNull @com.android.internal.util.DataClass.Each @android.annotation.FloatRange float[] mCoords\nprivate @android.annotation.NonNull android.os.IBinder mToken\nprivate @android.annotation.Nullable android.companion.ICompanionDeviceManager mIPCInterface\nprivate static java.lang.String defaultName4()\nprivate int[] lazyInitTmpStorage()\npublic android.net.LinkAddress[] getLinkAddresses4()\nprivate boolean patternEquals(java.util.regex.Pattern)\nprivate int patternHashCode()\nprivate void onConstructed()\npublic void dump(java.io.PrintWriter)\nclass SampleDataClass extends java.lang.Object implements [android.os.Parcelable]\n@com.android.internal.util.DataClass(genBuilder=true, genConstructor=true, genEqualsHashCode=true, genToString=true, genForEachField=true, genSetters=true)") @Deprecated private void __metadata() {} Loading
tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java +3 −3 Original line number Diff line number Diff line Loading @@ -85,7 +85,7 @@ public class SampleWithCustomBuilder implements Parcelable { // Code below generated by codegen v1.0.20. // Code below generated by codegen v1.0.23. // // DO NOT MODIFY! // CHECKSTYLE:OFF Generated code Loading Loading @@ -253,8 +253,8 @@ public class SampleWithCustomBuilder implements Parcelable { } @DataClass.Generated( time = 1604522373190L, codegenVersion = "1.0.20", time = 1616541540898L, codegenVersion = "1.0.23", sourceFile = "frameworks/base/tests/Codegen/src/com/android/codegentest/SampleWithCustomBuilder.java", inputSignatures = " long delayAmount\n @android.annotation.NonNull java.util.concurrent.TimeUnit delayUnit\n long creationTimestamp\nprivate static java.util.concurrent.TimeUnit unparcelDelayUnit(android.os.Parcel)\nprivate void parcelDelayUnit(android.os.Parcel,int)\nclass SampleWithCustomBuilder extends java.lang.Object implements [android.os.Parcelable]\nabstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayAmount(long)\npublic abstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayUnit(java.util.concurrent.TimeUnit)\npublic com.android.codegentest.SampleWithCustomBuilder.Builder setDelay(long,java.util.concurrent.TimeUnit)\nclass BaseBuilder extends java.lang.Object implements []\n@com.android.internal.util.DataClass(genBuilder=true, genAidl=false, genToString=true)\nabstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayAmount(long)\npublic abstract com.android.codegentest.SampleWithCustomBuilder.Builder setDelayUnit(java.util.concurrent.TimeUnit)\npublic com.android.codegentest.SampleWithCustomBuilder.Builder setDelay(long,java.util.concurrent.TimeUnit)\nclass BaseBuilder extends java.lang.Object implements []") @Deprecated Loading