< prev index next >

src/java.base/share/classes/jdk/internal/classfile/impl/BoundAttribute.java

Print this page
*** 929,10 ***
--- 929,27 ---
              }
              return permittedSubclasses;
          }
      }
  
+     public static final class BoundLoadableDescriptorsAttribute extends BoundAttribute<LoadableDescriptorsAttribute>
+             implements LoadableDescriptorsAttribute {
+         private List<Utf8Entry> loadableDescriptors = null;
+ 
+         public BoundLoadableDescriptorsAttribute(ClassReader cf, AttributeMapper<LoadableDescriptorsAttribute> mapper, int pos) {
+             super(cf, mapper, pos);
+         }
+ 
+         @Override
+         public List<Utf8Entry> loadableDescriptors() {
+             if (loadableDescriptors == null) {
+                 loadableDescriptors = readEntryList(payloadStart);
+             }
+             return loadableDescriptors;
+         }
+     }
+ 
      public abstract static sealed class BoundCodeAttribute
              extends BoundAttribute<CodeAttribute>
              implements CodeAttribute
              permits CodeImpl {
          protected final int codeStart;

*** 1008,10 ***
--- 1025,12 ---
                  name.equalsString(NAME_EXCEPTIONS) ? exceptions() : null;
              case 0x11392da9 ->
                  name.equalsString(NAME_INNER_CLASSES) ? innerClasses() : null;
              case 0x167536fc ->
                  name.equalsString(NAME_LINE_NUMBER_TABLE) ? lineNumberTable() : null;
+             case 0x4d56b212 ->
+                 name.equalsString(NAME_LOADABLE_DESCRIPTORS) ? loadableDescriptors() : null;
              case 0x46939abc ->
                  name.equalsString(NAME_LOCAL_VARIABLE_TABLE) ? localVariableTable() : null;
              case 0x63ee67f4 ->
                  name.equalsString(NAME_LOCAL_VARIABLE_TYPE_TABLE) ? localVariableTypeTable() : null;
              case 0x2b597e15 ->
< prev index next >