Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3222bfba authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Fix enums in experimental packages" into main

parents 91c48c69 0e8b0e70
Loading
Loading
Loading
Loading
+14 −19
Original line number Original line Diff line number Diff line
@@ -104,18 +104,15 @@ class ImplicitOutputFilter(


        log.d("Class ${cn.name} Class policy: $classPolicy")
        log.d("Class ${cn.name} Class policy: $classPolicy")
        if (classPolicy.policy.needsInOutput) {
        if (classPolicy.policy.needsInOutput) {
            // Do it only when the class needs to be kept...
            // If we keep a class in the output jar, we implicitly keep certain members too.

            // Member policy should be "keep" or "stub".
            val memberPolicy = classPolicy.policy.resolveClassWidePolicy()


            val mn = classes.findMethod(className, methodName, descriptor)
            val mn = classes.findMethod(className, methodName, descriptor)


            // Keep (or stub) the generated enum members.
            // Keep the generated enum members.
            if (cn.isEnum()) {
            if (cn.isEnum()) {
                mn?.let { mn ->
                mn?.let { mn ->
                    if (isAutoGeneratedEnumMember(mn)) {
                    if (isAutoGeneratedEnumMember(mn)) {
                        return memberPolicy.withReason(classPolicy.reason).wrapReason(
                        return FilterPolicy.Keep.withReason(classPolicy.reason).wrapReason(
                            "is-enum",
                            "is-enum",
                            StatsLabel.Ignored,
                            StatsLabel.Ignored,
                        )
                        )
@@ -123,19 +120,20 @@ class ImplicitOutputFilter(
                }
                }
            }
            }


            // Keep (or stub) all members of annotations.
            // Keep all members of annotations.
            if (cn.isAnnotation()) {
            if (cn.isAnnotation()) {
                return memberPolicy.withReason(classPolicy.reason).wrapReason(
                return FilterPolicy.Keep.withReason(classPolicy.reason).wrapReason(
                    "is-annotation",
                    "is-annotation",
                    StatsLabel.Ignored,
                    StatsLabel.Ignored,
                )
                )
            }
            }


            // For synthetic methods (such as lambdas), use the resolved policy --
            // Keep, Throw, Exp -- but set an "Ignored" label.
            mn?.let {
            mn?.let {
                if (mn.isSynthetic()) {
                if (mn.isSynthetic()) {
                    // For synthetic methods (such as lambdas), let's just inherit the class's
                    val resolved = classPolicy.policy.resolveClassWidePolicy()
                    // policy.
                    return resolved.withReason(classPolicy.reason).wrapReason(
                    return memberPolicy.withReason(classPolicy.reason).wrapReason(
                        "is-synthetic-method",
                        "is-synthetic-method",
                        StatsLabel.Ignored,
                        StatsLabel.Ignored,
                    )
                    )
@@ -157,23 +155,20 @@ class ImplicitOutputFilter(


        log.d("Class ${cn.name} Class policy: $classPolicy")
        log.d("Class ${cn.name} Class policy: $classPolicy")
        if (classPolicy.policy.needsInOutput) {
        if (classPolicy.policy.needsInOutput) {
            // Do it only when the class needs to be kept...
            // If we keep a class in the output jar, we implicitly keep certain members too.

            // Member policy should be "keep" or "stub".
            val memberPolicy = classPolicy.policy.resolveClassWidePolicy()


            // Keep (or stub) the generated enum members.
            // Keep the generated enum members.
            if (cn.isEnum()) {
            if (cn.isEnum()) {
                classes.findField(className, fieldName)?.let { fn ->
                classes.findField(className, fieldName)?.let { fn ->
                    if (isAutoGeneratedEnumMember(fn)) {
                    if (isAutoGeneratedEnumMember(fn)) {
                        return memberPolicy.withReason(classPolicy.reason).wrapReason("enum")
                        return FilterPolicy.Keep.withReason(classPolicy.reason).wrapReason("enum")
                    }
                    }
                }
                }
            }
            }


            // Keep (or stub) all members of annotations.
            // Keep all members of annotations.
            if (cn.isAnnotation()) {
            if (cn.isAnnotation()) {
                return memberPolicy.withReason(classPolicy.reason).wrapReason("annotation")
                return FilterPolicy.Keep.withReason(classPolicy.reason).wrapReason("annotation")
            }
            }
        }
        }


+225 −0
Original line number Original line Diff line number Diff line
@@ -5901,6 +5901,231 @@ RuntimeVisibleAnnotations:
    )
    )
  x: #x()
  x: #x()
    android.hosttest.annotation.HostSideTestStaticInitializerKeep
    android.hosttest.annotation.HostSideTestStaticInitializerKeep
## Class: com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum.class
  Compiled from "MoreClasses.java"
final class com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum extends java.lang.Enum<com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum>
  minor version: 0
  major version: 65
  flags: (0x4030) ACC_FINAL, ACC_SUPER, ACC_ENUM
  this_class: #x                          // com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
  super_class: #x                         // java/lang/Enum
  interfaces: 0, fields: 4, methods: 6, attributes: 3
Constant pool:
{
  public static final com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum A;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
          reason="enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )

  public static final com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum B;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
          reason="enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )

  public static final com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum C;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
          reason="enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )

  private static final com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum[] $VALUES;
    descriptor: [Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
          reason="enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )

  public static com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum[] values();
    descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=3, locals=0, args_size=0
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: ldc           #x                 // String values
         x: ldc           #x                 // String ()[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
         x: invokestatic  #x                 // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkHooks.onMethodCalled:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;)V
         x: getstatic     #x                 // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: invokevirtual #x                 // Method "[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;".clone:()Ljava/lang/Object;
        x: checkcast     #x                 // class "[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;"
        x: areturn
      LineNumberTable:
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
          reason="is-enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )

  public static com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum valueOf(java.lang.String);
    descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=3, locals=1, args_size=1
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: ldc           #x                 // String valueOf
         x: ldc           #x                 // String (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
         x: invokestatic  #x                 // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkHooks.onMethodCalled:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;)V
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: aload_0
        x: invokestatic  #x                 // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
        x: checkcast     #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: areturn
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            9      10     0  name   Ljava/lang/String;
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
          reason="is-enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )
    MethodParameters:
      Name                           Flags
      <no name>                      mandated

  private com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum();
    descriptor: (Ljava/lang/String;I)V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=3, locals=3, args_size=3
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: ldc           #x                 // String <init>
         x: ldc           #x                 // String (Ljava/lang/String;I)V
         x: invokestatic  #x                 // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkHooks.onMethodCalled:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;)V
         x: aload_0
        x: aload_1
        x: iload_2
        x: invokespecial #x                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
        x: return
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            9       7     0  this   Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    Signature: #x                          // ()V
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
          reason="is-enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )
    MethodParameters:
      Name                           Flags
      <no name>                      synthetic
      <no name>                      synthetic

  public void foo();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=3, locals=1, args_size=1
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: ldc           #x                 // String foo
         x: ldc           #x                 // String ()V
         x: invokestatic  #x                 // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkHooks.onMethodCalled:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;)V
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: ldc           #x                 // String foo
        x: ldc           #x                 // String ()V
        x: invokestatic  #x                 // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkHooks.onExperimentalMethodCalled:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;)Z
        x: invokestatic  #x                 // Method com/android/hoststubgen/hosthelper/HostTestUtils.assertThatHookReturnedTrue:(Z)V
        x: return
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
           21       1     0  this   Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsExperimental(
          reason="class-wide in com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )

  private static com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum[] $values();
    descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=4, locals=0, args_size=0
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: ldc           #x                 // String $values
         x: ldc           #x                 // String ()[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
         x: invokestatic  #x                 // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkHooks.onMethodCalled:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;)V
         x: iconst_3
        x: anewarray     #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: dup
        x: iconst_0
        x: getstatic     #x                 // Field A:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: aastore
        x: dup
        x: iconst_1
        x: getstatic     #x                 // Field B:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: aastore
        x: dup
        x: iconst_2
        x: getstatic     #x                 // Field C:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: aastore
        x: areturn
      LineNumberTable:
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
          reason="is-enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )

  static {};
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=4, locals=0, args_size=0
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: ldc           #x                 // String <clinit>
         x: ldc           #x                 // String ()V
         x: invokestatic  #x                 // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkHooks.onMethodCalled:(Ljava/lang/Class;Ljava/lang/String;Ljava/lang/String;)V
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: invokestatic  #x                 // Method com/android/hoststubgen/test/tinyframework/TinyFrameworkHooks.defaultClassLoadHook:(Ljava/lang/Class;)V
        x: new           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: dup
        x: ldc           #x                 // String A
        x: iconst_0
        x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;I)V
        x: putstatic     #x                 // Field A:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: new           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: dup
        x: ldc           #x                 // String B
        x: iconst_1
        x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;I)V
        x: putstatic     #x                 // Field B:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: new           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: dup
        x: ldc           #x                 // String C
        x: iconst_2
        x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;I)V
        x: putstatic     #x                 // Field C:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: invokestatic  #x                 // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: putstatic     #x                 // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: return
      LineNumberTable:
    RuntimeVisibleAnnotations:
      x: #x(#x=s#x)
        com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
          reason="is-enum [inner-reason: file-override [package - \'experimental\'] (#test-experimental-package-policy)]"
        )
}
Signature: #x                           // Ljava/lang/Enum<Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;>;
SourceFile: "MoreClasses.java"
RuntimeVisibleAnnotations:
  x: #x(#x=s#x)
    com.android.hoststubgen.hosthelper.HostStubGenProcessedAsKeep(
      reason="file-override [package - \'experimental\'] (#test-experimental-package-policy)"
    )
## Class: com/android/hoststubgen/test/tinyframework/exp/RedirectTo.class
## Class: com/android/hoststubgen/test/tinyframework/exp/RedirectTo.class
  Compiled from "MoreClasses.java"
  Compiled from "MoreClasses.java"
class com.android.hoststubgen.test.tinyframework.exp.RedirectTo
class com.android.hoststubgen.test.tinyframework.exp.RedirectTo
+139 −0
Original line number Original line Diff line number Diff line
@@ -4288,6 +4288,145 @@ RuntimeInvisibleAnnotations:
    )
    )
  x: #x()
  x: #x()
    android.hosttest.annotation.HostSideTestStaticInitializerKeep
    android.hosttest.annotation.HostSideTestStaticInitializerKeep
## Class: com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum.class
  Compiled from "MoreClasses.java"
final class com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum extends java.lang.Enum<com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum>
  minor version: 0
  major version: 65
  flags: (0x4030) ACC_FINAL, ACC_SUPER, ACC_ENUM
  this_class: #x                          // com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
  super_class: #x                        // java/lang/Enum
  interfaces: 0, fields: 4, methods: 6, attributes: 2
Constant pool:
{
  public static final com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum A;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM

  public static final com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum B;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM

  public static final com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum C;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM

  private static final com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum[] $VALUES;
    descriptor: [Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x101a) ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC

  public static com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum[] values();
    descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=1, locals=0, args_size=0
         x: getstatic     #x                 // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
         x: invokevirtual #x                 // Method "[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;".clone:()Ljava/lang/Object;
         x: checkcast     #x                 // class "[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;"
         x: areturn
      LineNumberTable:

  public static com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum valueOf(java.lang.String);
    descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: aload_0
         x: invokestatic  #x                 // Method java/lang/Enum.valueOf:(Ljava/lang/Class;Ljava/lang/String;)Ljava/lang/Enum;
         x: checkcast     #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: areturn
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0      10     0  name   Ljava/lang/String;
    MethodParameters:
      Name                           Flags
      <no name>                      mandated

  private com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum();
    descriptor: (Ljava/lang/String;I)V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=3, locals=3, args_size=3
         x: aload_0
         x: aload_1
         x: iload_2
         x: invokespecial #x                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
         x: return
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0       7     0  this   Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    MethodParameters:
      Name                           Flags
      <no name>                      synthetic
      <no name>                      synthetic
    Signature: #x                          // ()V

  public void foo();
    descriptor: ()V
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=0, locals=1, args_size=1
         x: return
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0       1     0  this   Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;

  private static com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum[] $values();
    descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=4, locals=0, args_size=0
         x: iconst_3
         x: anewarray     #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: dup
         x: iconst_0
         x: getstatic     #x                  // Field A:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
         x: aastore
        x: dup
        x: iconst_1
        x: getstatic     #x                  // Field B:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: aastore
        x: dup
        x: iconst_2
        x: getstatic     #x                 // Field C:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: aastore
        x: areturn
      LineNumberTable:

  static {};
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=4, locals=0, args_size=0
         x: new           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
         x: dup
         x: ldc           #x                 // String A
         x: iconst_0
         x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;I)V
        x: putstatic     #x                  // Field A:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: new           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: dup
        x: ldc           #x                 // String B
        x: iconst_1
        x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;I)V
        x: putstatic     #x                  // Field B:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: new           #x                  // class com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum
        x: dup
        x: ldc           #x                 // String C
        x: iconst_2
        x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;I)V
        x: putstatic     #x                 // Field C:Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: invokestatic  #x                 // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: putstatic     #x                 // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;
        x: return
      LineNumberTable:
}
Signature: #x                          // Ljava/lang/Enum<Lcom/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum;>;
SourceFile: "MoreClasses.java"
## Class: com/android/hoststubgen/test/tinyframework/exp/RedirectTo.class
## Class: com/android/hoststubgen/test/tinyframework/exp/RedirectTo.class
  Compiled from "MoreClasses.java"
  Compiled from "MoreClasses.java"
class com.android.hoststubgen.test.tinyframework.exp.RedirectTo
class com.android.hoststubgen.test.tinyframework.exp.RedirectTo
+11 −0
Original line number Original line Diff line number Diff line
@@ -1571,6 +1571,17 @@ com.android.hoststubgen.test.tinyframework.exp
  annotation
  annotation
  0
  0
  2
  2
com.android.hoststubgen.test.tinyframework.exp
  ExpC8_Enum
  0
  com.android.hoststubgen.test.tinyframework.exp.ExpC8_Enum
  foo
  foo()V
  0
  Experimental
  class-wide in com/android/hoststubgen/test/tinyframework/exp/ExpC8_Enum [inner-reason: file-override [package - 'experimental'] (#test-experimental-package-policy)]
  0
  0
com.android.hoststubgen.test.tinyframework.exp
com.android.hoststubgen.test.tinyframework.exp
  RedirectTo
  RedirectTo
  0
  0
+8 −0
Original line number Original line Diff line number Diff line
@@ -129,3 +129,11 @@ class RedirectTo {
    public static void redirect() {
    public static void redirect() {
    }
    }
}
}

enum ExpC8_Enum {
    A,
    B,
    C;
    public void foo() {
    }
}
 No newline at end of file