< prev index next >

src/java.base/share/classes/java/lang/classfile/Attributes.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

*** 26,10 ***
--- 26,11 ---
  
  import java.lang.classfile.AttributeMapper.AttributeStability;
  import java.lang.classfile.attribute.*;
  
  import jdk.internal.classfile.impl.AbstractAttributeMapper.*;
+ import jdk.internal.javac.PreviewFeature;
  
  /**
   * Attribute mappers for predefined (JVMS {@jvms 4.7}) and JDK-specific
   * nonstandard attributes.
   * <p>

*** 79,10 ***
--- 80,18 ---
      public static final String NAME_INNER_CLASSES = "InnerClasses";
  
      /** LineNumberTable */
      public static final String NAME_LINE_NUMBER_TABLE = "LineNumberTable";
  
+     /**
+      * LoadableDescriptors
+      *
+      * @since Valhalla
+      */
+     @PreviewFeature(feature = PreviewFeature.Feature.VALUE_OBJECTS, reflective = true)
+     public static final String NAME_LOADABLE_DESCRIPTORS = "LoadableDescriptors";
+ 
      /** LocalVariableTable */
      public static final String NAME_LOCAL_VARIABLE_TABLE = "LocalVariableTable";
  
      /** LocalVariableTypeTable */
      public static final String NAME_LOCAL_VARIABLE_TYPE_TABLE = "LocalVariableTypeTable";

*** 243,10 ***
--- 252,20 ---
       */
      public static AttributeMapper<LineNumberTableAttribute> lineNumberTable() {
          return LineNumberTableMapper.INSTANCE;
      }
  
+     /**
+      * {@return the mapper for the {@code LoadableDescriptors} attribute}
+      *
+      * @since Valhalla
+      */
+     @PreviewFeature(feature = PreviewFeature.Feature.VALUE_OBJECTS, reflective = true)
+     public static AttributeMapper<LoadableDescriptorsAttribute> loadableDescriptors() {
+         return LoadableDescriptorsMapper.INSTANCE;
+     }
+ 
      /**
       * {@return the mapper for the {@code LocalVariableTable} attribute}
       * The mapper permits multiple instances in a {@code Code} attribute.
       * This has a data dependency on {@linkplain AttributeStability#LABELS labels}.
       */
< prev index next >