< prev index next >

test/jdk/java/lang/invoke/DefineClassTest.java

Print this page
*** 257,11 ***
      /**
       * Generates a class file with the given class name
       */
      byte[] generateClass(String className) {
          return ClassFile.of().build(ClassDesc.of(className), clb -> {
!             clb.withFlags(AccessFlag.PUBLIC, AccessFlag.SUPER);
              clb.withSuperclass(CD_Object);
              clb.withMethodBody(INIT_NAME, MTD_void, PUBLIC, cob -> {
                  cob.aload(0);
                  cob.invokespecial(CD_Object, INIT_NAME, MTD_void);
                  cob.return_();
--- 257,11 ---
      /**
       * Generates a class file with the given class name
       */
      byte[] generateClass(String className) {
          return ClassFile.of().build(ClassDesc.of(className), clb -> {
!             clb.withFlags(AccessFlag.PUBLIC, AccessFlag.IDENTITY);
              clb.withSuperclass(CD_Object);
              clb.withMethodBody(INIT_NAME, MTD_void, PUBLIC, cob -> {
                  cob.aload(0);
                  cob.invokespecial(CD_Object, INIT_NAME, MTD_void);
                  cob.return_();

*** 299,11 ***
      byte[] generateClassWithInitializer(String className,
                                          String targetClass,
                                          String targetMethod) throws Exception {
  
          return ClassFile.of().build(ClassDesc.of(className), clb -> {
!             clb.withFlags(AccessFlag.PUBLIC, AccessFlag.SUPER);
              clb.withSuperclass(CD_Object);
              clb.withMethodBody(INIT_NAME, MTD_void, ACC_PUBLIC, cob -> {
                  cob.aload(0);
                  cob.invokespecial(CD_Object, INIT_NAME, MTD_void);
                  cob.return_();
--- 299,11 ---
      byte[] generateClassWithInitializer(String className,
                                          String targetClass,
                                          String targetMethod) throws Exception {
  
          return ClassFile.of().build(ClassDesc.of(className), clb -> {
!             clb.withFlags(AccessFlag.PUBLIC, AccessFlag.IDENTITY);
              clb.withSuperclass(CD_Object);
              clb.withMethodBody(INIT_NAME, MTD_void, ACC_PUBLIC, cob -> {
                  cob.aload(0);
                  cob.invokespecial(CD_Object, INIT_NAME, MTD_void);
                  cob.return_();

*** 318,11 ***
      /**
       * Generates a non-linkable class file with the given class name
       */
      byte[] generateNonLinkableClass(String className) {
          return ClassFile.of().build(ClassDesc.of(className), clb -> {
!             clb.withFlags(AccessFlag.PUBLIC, AccessFlag.SUPER);
              clb.withSuperclass(CD_MissingSuperClass);
              clb.withMethodBody(INIT_NAME, MTD_void, ACC_PUBLIC, cob -> {
                  cob.aload(0);
                  cob.invokespecial(CD_MissingSuperClass, INIT_NAME, MTD_void);
                  cob.return_();
--- 318,11 ---
      /**
       * Generates a non-linkable class file with the given class name
       */
      byte[] generateNonLinkableClass(String className) {
          return ClassFile.of().build(ClassDesc.of(className), clb -> {
!             clb.withFlags(AccessFlag.PUBLIC, AccessFlag.IDENTITY);
              clb.withSuperclass(CD_MissingSuperClass);
              clb.withMethodBody(INIT_NAME, MTD_void, ACC_PUBLIC, cob -> {
                  cob.aload(0);
                  cob.invokespecial(CD_MissingSuperClass, INIT_NAME, MTD_void);
                  cob.return_();
< prev index next >