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

Commit 198ba5b0 authored by Makoto Onuki's avatar Makoto Onuki Committed by Android (Google) Code Review
Browse files

Merge "[HostStubGen] Precise enum handling" into main

parents 71ee7643 293328da
Loading
Loading
Loading
Loading
+92 −0
Original line number Diff line number Diff line
@@ -22,6 +22,8 @@ import org.objectweb.asm.Opcodes
import org.objectweb.asm.Type
import org.objectweb.asm.tree.AnnotationNode
import org.objectweb.asm.tree.ClassNode
import org.objectweb.asm.tree.FieldNode
import org.objectweb.asm.tree.MethodNode


/** Name of the class initializer method. */
@@ -175,3 +177,93 @@ fun isVisibilityPrivateOrPackagePrivate(access: Int): Boolean {
        else -> false
    }
}

fun ClassNode.isEnum(): Boolean {
    return (this.access and Opcodes.ACC_ENUM) != 0
}

fun ClassNode.isAnnotation(): Boolean {
    return (this.access and Opcodes.ACC_ANNOTATION) != 0
}

fun ClassNode.isSynthetic(): Boolean {
    return (this.access and Opcodes.ACC_SYNTHETIC) != 0
}

fun MethodNode.isSynthetic(): Boolean {
    return (this.access and Opcodes.ACC_SYNTHETIC) != 0
}

fun FieldNode.isEnum(): Boolean {
    return (this.access and Opcodes.ACC_ENUM) != 0
}

fun FieldNode.isSynthetic(): Boolean {
    return (this.access and Opcodes.ACC_SYNTHETIC) != 0
}

/*

Dump of the members of TinyFrameworkEnumSimple:

class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple	keep
  field Cat	keep (ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM)
  field Dog	keep
  field $VALUES	keep (ACC_PRIVATE, ACC_STATIC, ACC_FINAL, ACC_SYNTHETIC)

  method values	()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;	keep
    ^- NOT synthetic (ACC_PUBLIC, ACC_STATIC)
  method valueOf	(Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;	keep
    ^- NOT synthetic (ACC_PUBLIC, ACC_STATIC)
  method <init>	(Ljava/lang/String;I)V	keep
    ^- NOT synthetic (ACC_PRIVATE)

  method $values	()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;	keep
     (ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC)
  method <clinit>	()V	keep

Dump of the members of TinyFrameworkEnumSimple:

class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex	keep
  field RED	keep
  field BLUE	keep
  field GREEN	keep
  field mLongName	keep
  field mShortName	keep
  field $VALUES	keep
  method values	()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;	keep
  method valueOf	(Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;	keep
  method <init>	(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V	keep
  method getLongName	()Ljava/lang/String;	keep
  method getShortName	()Ljava/lang/String;	keep
  method $values	()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;	keep
  method <clinit>	()V	keep

 */

fun isAutoGeneratedEnumMember(mn: MethodNode): Boolean {
    if (mn.isSynthetic()) {
        return true
    }
    if (mn.name == "<init>" && mn.desc == "(Ljava/lang/String;I)V") {
        return true
    }
    if (mn.name == "<clinit>" && mn.desc == "()V") {
        return true
    }
    if (mn.name == "values" && mn.desc.startsWith("()")) {
        return true
    }
    if (mn.name == "valueOf" && mn.desc.startsWith("(Ljava/lang/String;)")) {
        return true
    }

    return false
}

fun isAutoGeneratedEnumMember(fn: FieldNode): Boolean {
    if (fn.isSynthetic() || fn.isEnum()) {
        return true
    }
    return false
}
+67 −12
Original line number Diff line number Diff line
@@ -22,6 +22,9 @@ import com.android.hoststubgen.asm.CLASS_INITIALIZER_NAME
import com.android.hoststubgen.asm.isAnonymousInnerClass
import com.android.hoststubgen.log
import com.android.hoststubgen.asm.ClassNodes
import com.android.hoststubgen.asm.isAnnotation
import com.android.hoststubgen.asm.isAutoGeneratedEnumMember
import com.android.hoststubgen.asm.isEnum
import com.android.hoststubgen.asm.isVisibilityPrivateOrPackagePrivate
import org.objectweb.asm.tree.ClassNode

@@ -57,18 +60,8 @@ class ImplicitOutputFilter(
    override fun getPolicyForClass(className: String): FilterPolicyWithReason {
        val fallback = super.getPolicyForClass(className)

        // TODO: This check should be cached.
        val cn = classes.getClass(className)

        if (cn.superName == "java/lang/Enum" &&
                fallback.policy == FilterPolicy.Keep) {
            return FilterPolicy.KeepClass.withReason("enum")
        }
        if (cn.interfaces.contains("java/lang/annotation/Annotation") &&
                fallback.policy == FilterPolicy.Keep) {
            return FilterPolicy.KeepClass.withReason("annotation")
        }

        // Use the implicit policy, if any.
        getClassImplicitPolicy(className, cn)?.let { return it }

@@ -95,16 +88,78 @@ class ImplicitOutputFilter(
            }
        }

        val cn = classes.getClass(className)

        // If we throw from the static initializer, the class would be useless, so we convert it
        // "keep" instead.
        if (methodName == CLASS_INITIALIZER_NAME && descriptor == CLASS_INITIALIZER_DESC &&
                fallback.policy == FilterPolicy.Throw) {
        // Unless it's an enum -- in that case, the below code would handle it.
        if (!cn.isEnum() &&
                fallback.policy == FilterPolicy.Throw &&
                methodName == CLASS_INITIALIZER_NAME && descriptor == CLASS_INITIALIZER_DESC) {
            // TODO Maybe show a warning?? But that'd be too noisy with --default-throw.
            return FilterPolicy.Ignore.withReason(
                "'throw' on static initializer is handled as 'ignore'" +
                        " [original throw reason: ${fallback.reason}]")
        }

        val classPolicy = super.getPolicyForClass(className)

        log.d("Class ${cn.name} Class policy: $classPolicy")
        if (classPolicy.policy.needsInImpl) {
            // Do it only when the class needs to be kept...

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

            // Keep (or stub) the generated enum members.
            if (cn.isEnum()) {
                classes.findMethod(className, methodName, descriptor)?.let { mn ->
                    if (isAutoGeneratedEnumMember(mn)) {
                        return memberPolicy.withReason(classPolicy.reason).wrapReason("enum")
                    }
                }
            }

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

        return fallback
    }

    override fun getPolicyForField(
            className: String,
            fieldName: String
    ): FilterPolicyWithReason {
        val fallback = super.getPolicyForField(className, fieldName)

        val cn = classes.getClass(className)
        val classPolicy = super.getPolicyForClass(className)

        log.d("Class ${cn.name} Class policy: $classPolicy")
        if (classPolicy.policy.needsInImpl) {
            // Do it only when the class needs to be kept...

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

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

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

        return fallback
    }
}
 No newline at end of file
+308 −0
Original line number Diff line number Diff line
@@ -879,6 +879,314 @@ RuntimeInvisibleAnnotations:
    android.hosttest.annotation.HostSideTestStub
  x: #x()
    android.hosttest.annotation.HostSideTestStaticInitializerStub
## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex.class
  Compiled from "TinyFrameworkEnumComplex.java"
public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex extends java.lang.Enum<com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex>
  minor version: 0
  major version: 61
  flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM
  this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
  super_class: #x                        // java/lang/Enum
  interfaces: 0, fields: 6, methods: 7, attributes: 3
  public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex RED;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestStub

  public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex GREEN;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestStub

  public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex BLUE;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestStub

  private final java.lang.String mLongName;
    descriptor: Ljava/lang/String;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestKeep

  private final java.lang.String mShortName;
    descriptor: Ljava/lang/String;
    flags: (0x0012) ACC_PRIVATE, ACC_FINAL
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestKeep

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

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

  public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex valueOf(java.lang.String);
    descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
         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/TinyFrameworkEnumComplex
         x: areturn
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0      10     0  name   Ljava/lang/String;

  private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex(java.lang.String, java.lang.String);
    descriptor: (Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
    flags: (0x0002) ACC_PRIVATE
    Code:
      stack=3, locals=5, args_size=5
         x: aload_0
         x: aload_1
         x: iload_2
         x: invokespecial #x                 // Method java/lang/Enum."<init>":(Ljava/lang/String;I)V
         x: aload_0
         x: aload_3
         x: putfield      #x                 // Field mLongName:Ljava/lang/String;
        x: aload_0
        x: aload         4
        x: putfield      #x                 // Field mShortName:Ljava/lang/String;
        x: return
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0      18     0  this   Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
            0      18     3 longName   Ljava/lang/String;
            0      18     4 shortName   Ljava/lang/String;
    Signature: #x                          // (Ljava/lang/String;Ljava/lang/String;)V
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestStub

  public java.lang.String getLongName();
    descriptor: ()Ljava/lang/String;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
         x: aload_0
         x: getfield      #x                 // Field mLongName:Ljava/lang/String;
         x: areturn
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0       5     0  this   Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestStub

  public java.lang.String getShortName();
    descriptor: ()Ljava/lang/String;
    flags: (0x0001) ACC_PUBLIC
    Code:
      stack=1, locals=1, args_size=1
         x: aload_0
         x: getfield      #x                 // Field mShortName:Ljava/lang/String;
         x: areturn
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0       5     0  this   Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestStub

  private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumComplex[] $values();
    descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
    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/TinyFrameworkEnumComplex
         x: dup
         x: iconst_0
         x: getstatic     #x                  // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
         x: aastore
        x: dup
        x: iconst_1
        x: getstatic     #x                  // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
        x: aastore
        x: dup
        x: iconst_2
        x: getstatic     #x                 // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
        x: aastore
        x: areturn
      LineNumberTable:

  static {};
    descriptor: ()V
    flags: (0x0008) ACC_STATIC
    Code:
      stack=6, locals=0, args_size=0
         x: new           #x                  // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
         x: dup
         x: ldc           #x                 // String RED
         x: iconst_0
         x: ldc           #x                 // String Red
         x: ldc           #x                 // String R
        x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
        x: putstatic     #x                  // Field RED:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
        x: new           #x                  // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
        x: dup
        x: ldc           #x                 // String GREEN
        x: iconst_1
        x: ldc           #x                 // String Green
        x: ldc           #x                 // String G
        x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
        x: putstatic     #x                  // Field GREEN:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
        x: new           #x                  // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex
        x: dup
        x: ldc           #x                 // String BLUE
        x: iconst_2
        x: ldc           #x                 // String Blue
        x: ldc           #x                 // String B
        x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;ILjava/lang/String;Ljava/lang/String;)V
        x: putstatic     #x                 // Field BLUE:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
        x: invokestatic  #x                 // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
        x: putstatic     #x                 // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;
        x: return
      LineNumberTable:
}
Signature: #x                          // Ljava/lang/Enum<Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumComplex;>;
SourceFile: "TinyFrameworkEnumComplex.java"
RuntimeInvisibleAnnotations:
  x: #x()
    android.hosttest.annotation.HostSideTestStub
## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple.class
  Compiled from "TinyFrameworkEnumSimple.java"
public final class com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple extends java.lang.Enum<com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple>
  minor version: 0
  major version: 61
  flags: (0x4031) ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_ENUM
  this_class: #x                          // com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple
  super_class: #x                        // java/lang/Enum
  interfaces: 0, fields: 3, methods: 5, attributes: 3
  public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple CAT;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestStub

  public static final com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple DOG;
    descriptor: Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
    flags: (0x4019) ACC_PUBLIC, ACC_STATIC, ACC_FINAL, ACC_ENUM
    RuntimeInvisibleAnnotations:
      x: #x()
        android.hosttest.annotation.HostSideTestStub

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

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

  public static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple valueOf(java.lang.String);
    descriptor: (Ljava/lang/String;)Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
    flags: (0x0009) ACC_PUBLIC, ACC_STATIC
    Code:
      stack=2, locals=1, args_size=1
         x: ldc           #x                  // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple
         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/TinyFrameworkEnumSimple
         x: areturn
      LineNumberTable:
      LocalVariableTable:
        Start  Length  Slot  Name   Signature
            0      10     0  name   Ljava/lang/String;

  private com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple();
    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/TinyFrameworkEnumSimple;
    Signature: #x                          // ()V

  private static com.android.hoststubgen.test.tinyframework.TinyFrameworkEnumSimple[] $values();
    descriptor: ()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
    flags: (0x100a) ACC_PRIVATE, ACC_STATIC, ACC_SYNTHETIC
    Code:
      stack=4, locals=0, args_size=0
         x: iconst_2
         x: anewarray     #x                  // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple
         x: dup
         x: iconst_0
         x: getstatic     #x                  // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
         x: aastore
        x: dup
        x: iconst_1
        x: getstatic     #x                  // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
        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/TinyFrameworkEnumSimple
         x: dup
         x: ldc           #x                 // String CAT
         x: iconst_0
         x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;I)V
        x: putstatic     #x                  // Field CAT:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
        x: new           #x                  // class com/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple
        x: dup
        x: ldc           #x                 // String DOG
        x: iconst_1
        x: invokespecial #x                 // Method "<init>":(Ljava/lang/String;I)V
        x: putstatic     #x                  // Field DOG:Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
        x: invokestatic  #x                 // Method $values:()[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
        x: putstatic     #x                 // Field $VALUES:[Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;
        x: return
      LineNumberTable:
}
Signature: #x                          // Ljava/lang/Enum<Lcom/android/hoststubgen/test/tinyframework/TinyFrameworkEnumSimple;>;
SourceFile: "TinyFrameworkEnumSimple.java"
RuntimeInvisibleAnnotations:
  x: #x()
    android.hosttest.annotation.HostSideTestStub
## Class: com/android/hoststubgen/test/tinyframework/TinyFrameworkExceptionTester.class
  Compiled from "TinyFrameworkExceptionTester.java"
public class com.android.hoststubgen.test.tinyframework.TinyFrameworkExceptionTester
+224 −0

File changed.

Preview size limit exceeded, changes collapsed.

+318 −0

File changed.

Preview size limit exceeded, changes collapsed.

Loading