< prev index next >

src/jdk.jdeps/share/classes/com/sun/tools/classfile/AccessFlags.java

Print this page
@@ -37,31 +37,33 @@
   *  This code and its internal interfaces are subject to change or
   *  deletion without notice.</b>
   */
  public class AccessFlags {
      public static final int ACC_PUBLIC        = 0x0001; // class, inner, field, method
+     public static final int ACC_REF_DEFAULT   = 0x0001; // javac extra
      public static final int ACC_PRIVATE       = 0x0002; //        inner, field, method
      public static final int ACC_PROTECTED     = 0x0004; //        inner, field, method
      public static final int ACC_STATIC        = 0x0008; //        inner, field, method
      public static final int ACC_FINAL         = 0x0010; // class, inner, field, method
      public static final int ACC_SUPER         = 0x0020; // class
      public static final int ACC_SYNCHRONIZED  = 0x0020; //                      method
      public static final int ACC_VOLATILE      = 0x0040; //               field
      public static final int ACC_BRIDGE        = 0x0040; //                      method
      public static final int ACC_TRANSIENT     = 0x0080; //               field
      public static final int ACC_VARARGS       = 0x0080; //                      method
+     public static final int ACC_PRIMITIVE     = 0x0100; // class
      public static final int ACC_NATIVE        = 0x0100; //                      method
      public static final int ACC_INTERFACE     = 0x0200; // class, inner
      public static final int ACC_ABSTRACT      = 0x0400; // class, inner,        method
      public static final int ACC_STRICT        = 0x0800; //                      method
      public static final int ACC_SYNTHETIC     = 0x1000; // class, inner, field, method
      public static final int ACC_ANNOTATION    = 0x2000; // class, inner
      public static final int ACC_ENUM          = 0x4000; // class, inner, field
      public static final int ACC_MANDATED      = 0x8000; //                          method parameter
      public static final int ACC_MODULE        = 0x8000; // class
  
-     public static enum Kind { Class, InnerClass, Field, Method}
+     public static enum Kind { Class, InnerClass, Field, Method, JavacExtra}
  
      AccessFlags(ClassReader cr) throws IOException {
          this(cr.readUnsignedShort());
      }
  

@@ -80,16 +82,16 @@
      public int byteLength() {
          return 2;
      }
  
      private static final int[] classModifiers = {
-         ACC_PUBLIC, ACC_FINAL, ACC_ABSTRACT
+         ACC_PUBLIC, ACC_FINAL, ACC_ABSTRACT, ACC_PRIMITIVE
      };
  
      private static final int[] classFlags = {
          ACC_PUBLIC, ACC_FINAL, ACC_SUPER, ACC_INTERFACE, ACC_ABSTRACT,
-         ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM, ACC_MODULE
+         ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM, ACC_MODULE, ACC_PRIMITIVE
      };
  
      public Set<String> getClassModifiers() {
          int f = ((flags & ACC_INTERFACE) != 0 ? flags & ~ACC_ABSTRACT : flags);
          return getModifiers(f, classModifiers, Kind.Class);

@@ -99,16 +101,16 @@
          return getFlags(classFlags, Kind.Class);
      }
  
      private static final int[] innerClassModifiers = {
          ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL,
-         ACC_ABSTRACT
+         ACC_ABSTRACT, ACC_PRIMITIVE
      };
  
      private static final int[] innerClassFlags = {
          ACC_PUBLIC, ACC_PRIVATE, ACC_PROTECTED, ACC_STATIC, ACC_FINAL, ACC_SUPER,
-         ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM
+         ACC_INTERFACE, ACC_ABSTRACT, ACC_SYNTHETIC, ACC_ANNOTATION, ACC_ENUM, ACC_PRIMITIVE
      };
  
      public Set<String> getInnerClassModifiers() {
          int f = ((flags & ACC_INTERFACE) != 0 ? flags & ~ACC_ABSTRACT : flags);
          return getModifiers(f, innerClassModifiers, Kind.InnerClass);

@@ -201,12 +203,13 @@
                  return "synchronized";
              case 0x80:
                  return (t == Kind.Field ? "transient" : null);
              case ACC_VOLATILE:
                  return "volatile";
-             case ACC_NATIVE:
-                 return "native";
+             case 0x100:
+                 // ACC_NATIVE or ACC_PRIMITIVE
+                 return (t == Kind.Class || t == Kind.InnerClass) ? "primitive" : "native";
              case ACC_ABSTRACT:
                  return "abstract";
              case ACC_STRICT:
                  return "strictfp";
              case ACC_MANDATED:

@@ -232,12 +235,12 @@
              return (t == Kind.Class ? "ACC_SUPER" : "ACC_SYNCHRONIZED");
          case 0x40:
              return (t == Kind.Field ? "ACC_VOLATILE" : "ACC_BRIDGE");
          case 0x80:
              return (t == Kind.Field ? "ACC_TRANSIENT" : "ACC_VARARGS");
-         case ACC_NATIVE:
-             return "ACC_NATIVE";
+         case 0x100:
+             return (t == Kind.Class || t == Kind.InnerClass) ? "ACC_PRIMITIVE" : "ACC_NATIVE";
          case ACC_INTERFACE:
              return "ACC_INTERFACE";
          case ACC_ABSTRACT:
              return "ACC_ABSTRACT";
          case ACC_STRICT:
< prev index next >