< prev index next >

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

Print this page
*** 50,10 ***
--- 50,11 ---
  import java.lang.classfile.attribute.ExceptionsAttribute;
  import java.lang.classfile.attribute.InnerClassInfo;
  import java.lang.classfile.attribute.InnerClassesAttribute;
  import java.lang.classfile.attribute.LineNumberInfo;
  import java.lang.classfile.attribute.LineNumberTableAttribute;
+ import java.lang.classfile.attribute.LoadableDescriptorsAttribute;
  import java.lang.classfile.attribute.LocalVariableInfo;
  import java.lang.classfile.attribute.LocalVariableTableAttribute;
  import java.lang.classfile.attribute.LocalVariableTypeInfo;
  import java.lang.classfile.attribute.LocalVariableTypeTableAttribute;
  import java.lang.classfile.attribute.MethodParameterInfo;

*** 427,10 ***
--- 428,26 ---
          public List<ClassEntry> permittedSubclasses() {
              return permittedSubclasses;
          }
      }
  
+     public static final class UnboundLoadableDescriptorsAttribute
+             extends UnboundAttribute<LoadableDescriptorsAttribute>
+             implements LoadableDescriptorsAttribute {
+         private final List<Utf8Entry> loadableDescriptors;
+ 
+         public UnboundLoadableDescriptorsAttribute(List<Utf8Entry> loadableDescriptors) {
+             super(Attributes.loadableDescriptors());
+             this.loadableDescriptors = List.copyOf(loadableDescriptors);
+         }
+ 
+         @Override
+         public List<Utf8Entry> loadableDescriptors() {
+             return loadableDescriptors;
+         }
+     }
+ 
      public static final class UnboundNestMembersAttribute
              extends UnboundAttribute<NestMembersAttribute>
              implements NestMembersAttribute {
          private final List<ClassEntry> memberEntries;
  
< prev index next >