< prev index next >

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

Print this page
*** 1,7 ***
  /*
!  * Copyright (c) 2022, 2025, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.  Oracle designates this
--- 1,7 ---
  /*
!  * Copyright (c) 2022, 2026, Oracle and/or its affiliates. All rights reserved.
   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   *
   * This code is free software; you can redistribute it and/or modify it
   * under the terms of the GNU General Public License version 2 only, as
   * published by the Free Software Foundation.  Oracle designates this

*** 510,10 ***
--- 510,34 ---
          public Utf8Entry attributeName() {
              return NAME;
          }
      }
  
+     public static final class UnboundLoadableDescriptorsAttribute
+             extends UnboundAttribute<LoadableDescriptorsAttribute>
+             implements LoadableDescriptorsAttribute {
+ 
+         private static final Utf8Entry NAME = TemporaryConstantPool.INSTANCE.utf8Entry(Attributes.NAME_LOADABLE_DESCRIPTORS);
+ 
+         private final List<Utf8Entry> loadableDescriptors;
+ 
+         public UnboundLoadableDescriptorsAttribute(List<Utf8Entry> loadableDescriptors) {
+             super(Attributes.loadableDescriptors());
+             this.loadableDescriptors = Util.sanitizeU2List(loadableDescriptors);
+         }
+ 
+         @Override
+         public List<Utf8Entry> loadableDescriptors() {
+             return loadableDescriptors;
+         }
+ 
+         @Override
+         public Utf8Entry attributeName() {
+             return NAME;
+         }
+     }
+ 
      public static final class UnboundNestMembersAttribute
              extends UnboundAttribute<NestMembersAttribute>
              implements NestMembersAttribute {
  
          private static final Utf8Entry NAME = TemporaryConstantPool.INSTANCE.utf8Entry(Attributes.NAME_NEST_MEMBERS);
< prev index next >