< prev index next >

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

Print this page
@@ -70,10 +70,11 @@
  import jdk.internal.classfile.attribute.ModuleResolutionAttribute;
  import jdk.internal.classfile.attribute.ModuleTargetAttribute;
  import jdk.internal.classfile.attribute.NestHostAttribute;
  import jdk.internal.classfile.attribute.NestMembersAttribute;
  import jdk.internal.classfile.attribute.PermittedSubclassesAttribute;
+ import jdk.internal.classfile.attribute.PreloadAttribute;
  import jdk.internal.classfile.attribute.RecordAttribute;
  import jdk.internal.classfile.attribute.RecordComponentInfo;
  import jdk.internal.classfile.attribute.RuntimeInvisibleAnnotationsAttribute;
  import jdk.internal.classfile.attribute.RuntimeInvisibleParameterAnnotationsAttribute;
  import jdk.internal.classfile.attribute.RuntimeInvisibleTypeAnnotationsAttribute;

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