code: private void addGetParcelObject(TypeSpec.Builder classBuilder) {
          MethodSpec.Builder methodBuilder = MethodSpec.methodBuilder("getParcelerObject")
                  .addModifiers(Modifier.PRIVATE)
                  .returns(Object.class)
                  .addParameter(String.class, "pClassName")
                  .addParameter(ClassName.get("android.os", "Parcel"), "data")
                  .beginControlFlow("try")
                  .addStatement("$T p = null", ClassName.get("android.os", "Parcelable"))
                  .addStatement("$T creator  = (Parcelable.Creator)Class.forName(pClassName+\"$$$$Parcelable\").getField(\"CREATOR\").get(null)", ClassName.get("android.os", "Parcelable.Creator"))
                  .addStatement("Object pWrapper = creator.createFromParcel(data)")
                  .addStatement("return pWrapper.getClass().getMethod(\"getParcel\", (Class[])null).invoke(pWrapper)")
                  .endControlFlow()
                  .beginControlFlow("catch (Exception ignored)")
                  .addStatement("return null")
                  .endControlFlow();
          classBuilder.addMethod(methodBuilder.build());
      }
docs: getParcelObject method