< prev index next >

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

Print this page




  43     public static final String CharacterRangeTable      = "CharacterRangeTable";
  44     public static final String Code                     = "Code";
  45     public static final String ConstantValue            = "ConstantValue";
  46     public static final String CompilationID            = "CompilationID";
  47     public static final String Deprecated               = "Deprecated";
  48     public static final String EnclosingMethod          = "EnclosingMethod";
  49     public static final String Exceptions               = "Exceptions";
  50     public static final String InnerClasses             = "InnerClasses";
  51     public static final String LineNumberTable          = "LineNumberTable";
  52     public static final String LocalVariableTable       = "LocalVariableTable";
  53     public static final String LocalVariableTypeTable   = "LocalVariableTypeTable";
  54     public static final String MethodParameters         = "MethodParameters";
  55     public static final String Module                   = "Module";
  56     public static final String ModuleHashes             = "ModuleHashes";
  57     public static final String ModuleMainClass          = "ModuleMainClass";
  58     public static final String ModulePackages           = "ModulePackages";
  59     public static final String ModuleResolution         = "ModuleResolution";
  60     public static final String ModuleTarget             = "ModuleTarget";
  61     public static final String NestHost                 = "NestHost";
  62     public static final String NestMembers              = "NestMembers";

  63     public static final String RuntimeVisibleAnnotations = "RuntimeVisibleAnnotations";
  64     public static final String RuntimeInvisibleAnnotations = "RuntimeInvisibleAnnotations";
  65     public static final String RuntimeVisibleParameterAnnotations = "RuntimeVisibleParameterAnnotations";
  66     public static final String RuntimeInvisibleParameterAnnotations = "RuntimeInvisibleParameterAnnotations";
  67     public static final String RuntimeVisibleTypeAnnotations = "RuntimeVisibleTypeAnnotations";
  68     public static final String RuntimeInvisibleTypeAnnotations = "RuntimeInvisibleTypeAnnotations";

  69     public static final String Signature                = "Signature";
  70     public static final String SourceDebugExtension     = "SourceDebugExtension";
  71     public static final String SourceFile               = "SourceFile";
  72     public static final String SourceID                 = "SourceID";
  73     public static final String StackMap                 = "StackMap";
  74     public static final String StackMapTable            = "StackMapTable";
  75     public static final String Synthetic                = "Synthetic";
  76 
  77     public static class Factory {
  78         public Factory() {
  79             // defer init of standardAttributeClasses until after options set up
  80         }
  81 
  82         public Attribute createAttribute(ClassReader cr, int name_index, byte[] data)
  83                 throws IOException {
  84             if (standardAttributes == null) {
  85                 init();
  86             }
  87 
  88             ConstantPool cp = cr.getConstantPool();


 117             standardAttributes.put(CharacterRangeTable, CharacterRangeTable_attribute.class);
 118             standardAttributes.put(Code,              Code_attribute.class);
 119             standardAttributes.put(CompilationID,     CompilationID_attribute.class);
 120             standardAttributes.put(ConstantValue,     ConstantValue_attribute.class);
 121             standardAttributes.put(Deprecated,        Deprecated_attribute.class);
 122             standardAttributes.put(EnclosingMethod,   EnclosingMethod_attribute.class);
 123             standardAttributes.put(Exceptions,        Exceptions_attribute.class);
 124             standardAttributes.put(InnerClasses,      InnerClasses_attribute.class);
 125             standardAttributes.put(LineNumberTable,   LineNumberTable_attribute.class);
 126             standardAttributes.put(LocalVariableTable, LocalVariableTable_attribute.class);
 127             standardAttributes.put(LocalVariableTypeTable, LocalVariableTypeTable_attribute.class);
 128             standardAttributes.put(MethodParameters,  MethodParameters_attribute.class);
 129             standardAttributes.put(Module,            Module_attribute.class);
 130             standardAttributes.put(ModuleHashes,      ModuleHashes_attribute.class);
 131             standardAttributes.put(ModuleMainClass,   ModuleMainClass_attribute.class);
 132             standardAttributes.put(ModulePackages,    ModulePackages_attribute.class);
 133             standardAttributes.put(ModuleResolution,  ModuleResolution_attribute.class);
 134             standardAttributes.put(ModuleTarget,      ModuleTarget_attribute.class);
 135             standardAttributes.put(NestHost, NestHost_attribute.class);
 136             standardAttributes.put(NestMembers, NestMembers_attribute.class);

 137             standardAttributes.put(RuntimeInvisibleAnnotations, RuntimeInvisibleAnnotations_attribute.class);
 138             standardAttributes.put(RuntimeInvisibleParameterAnnotations, RuntimeInvisibleParameterAnnotations_attribute.class);
 139             standardAttributes.put(RuntimeVisibleAnnotations, RuntimeVisibleAnnotations_attribute.class);
 140             standardAttributes.put(RuntimeVisibleParameterAnnotations, RuntimeVisibleParameterAnnotations_attribute.class);
 141             standardAttributes.put(RuntimeVisibleTypeAnnotations, RuntimeVisibleTypeAnnotations_attribute.class);
 142             standardAttributes.put(RuntimeInvisibleTypeAnnotations, RuntimeInvisibleTypeAnnotations_attribute.class);

 143             standardAttributes.put(Signature,         Signature_attribute.class);
 144             standardAttributes.put(SourceDebugExtension, SourceDebugExtension_attribute.class);
 145             standardAttributes.put(SourceFile,        SourceFile_attribute.class);
 146             standardAttributes.put(SourceID,          SourceID_attribute.class);
 147             standardAttributes.put(StackMap,          StackMap_attribute.class);
 148             standardAttributes.put(StackMapTable,     StackMapTable_attribute.class);
 149             standardAttributes.put(Synthetic,         Synthetic_attribute.class);
 150         }
 151 
 152         private Map<String,Class<? extends Attribute>> standardAttributes;
 153     }
 154 
 155     public static Attribute read(ClassReader cr) throws IOException {
 156         return cr.readAttribute();
 157     }
 158 
 159     protected Attribute(int name_index, int length) {
 160         attribute_name_index = name_index;
 161         attribute_length = length;
 162     }


 182         R visitCharacterRangeTable(CharacterRangeTable_attribute attr, P p);
 183         R visitCode(Code_attribute attr, P p);
 184         R visitCompilationID(CompilationID_attribute attr, P p);
 185         R visitConstantValue(ConstantValue_attribute attr, P p);
 186         R visitDeprecated(Deprecated_attribute attr, P p);
 187         R visitEnclosingMethod(EnclosingMethod_attribute attr, P p);
 188         R visitExceptions(Exceptions_attribute attr, P p);
 189         R visitInnerClasses(InnerClasses_attribute attr, P p);
 190         R visitLineNumberTable(LineNumberTable_attribute attr, P p);
 191         R visitLocalVariableTable(LocalVariableTable_attribute attr, P p);
 192         R visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, P p);
 193         R visitMethodParameters(MethodParameters_attribute attr, P p);
 194         R visitModule(Module_attribute attr, P p);
 195         R visitModuleHashes(ModuleHashes_attribute attr, P p);
 196         R visitModuleMainClass(ModuleMainClass_attribute attr, P p);
 197         R visitModulePackages(ModulePackages_attribute attr, P p);
 198         R visitModuleResolution(ModuleResolution_attribute attr, P p);
 199         R visitModuleTarget(ModuleTarget_attribute attr, P p);
 200         R visitNestHost(NestHost_attribute attr, P p);
 201         R visitNestMembers(NestMembers_attribute attr, P p);

 202         R visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, P p);
 203         R visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, P p);
 204         R visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, P p);
 205         R visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, P p);
 206         R visitRuntimeVisibleTypeAnnotations(RuntimeVisibleTypeAnnotations_attribute attr, P p);
 207         R visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute attr, P p);

 208         R visitSignature(Signature_attribute attr, P p);
 209         R visitSourceDebugExtension(SourceDebugExtension_attribute attr, P p);
 210         R visitSourceFile(SourceFile_attribute attr, P p);
 211         R visitSourceID(SourceID_attribute attr, P p);
 212         R visitStackMap(StackMap_attribute attr, P p);
 213         R visitStackMapTable(StackMapTable_attribute attr, P p);
 214         R visitSynthetic(Synthetic_attribute attr, P p);
 215     }
 216 }


  43     public static final String CharacterRangeTable      = "CharacterRangeTable";
  44     public static final String Code                     = "Code";
  45     public static final String ConstantValue            = "ConstantValue";
  46     public static final String CompilationID            = "CompilationID";
  47     public static final String Deprecated               = "Deprecated";
  48     public static final String EnclosingMethod          = "EnclosingMethod";
  49     public static final String Exceptions               = "Exceptions";
  50     public static final String InnerClasses             = "InnerClasses";
  51     public static final String LineNumberTable          = "LineNumberTable";
  52     public static final String LocalVariableTable       = "LocalVariableTable";
  53     public static final String LocalVariableTypeTable   = "LocalVariableTypeTable";
  54     public static final String MethodParameters         = "MethodParameters";
  55     public static final String Module                   = "Module";
  56     public static final String ModuleHashes             = "ModuleHashes";
  57     public static final String ModuleMainClass          = "ModuleMainClass";
  58     public static final String ModulePackages           = "ModulePackages";
  59     public static final String ModuleResolution         = "ModuleResolution";
  60     public static final String ModuleTarget             = "ModuleTarget";
  61     public static final String NestHost                 = "NestHost";
  62     public static final String NestMembers              = "NestMembers";
  63     public static final String Record                   = "Record";
  64     public static final String RuntimeVisibleAnnotations = "RuntimeVisibleAnnotations";
  65     public static final String RuntimeInvisibleAnnotations = "RuntimeInvisibleAnnotations";
  66     public static final String RuntimeVisibleParameterAnnotations = "RuntimeVisibleParameterAnnotations";
  67     public static final String RuntimeInvisibleParameterAnnotations = "RuntimeInvisibleParameterAnnotations";
  68     public static final String RuntimeVisibleTypeAnnotations = "RuntimeVisibleTypeAnnotations";
  69     public static final String RuntimeInvisibleTypeAnnotations = "RuntimeInvisibleTypeAnnotations";
  70     public static final String PermittedSubtypes        = "PermittedSubtypes";
  71     public static final String Signature                = "Signature";
  72     public static final String SourceDebugExtension     = "SourceDebugExtension";
  73     public static final String SourceFile               = "SourceFile";
  74     public static final String SourceID                 = "SourceID";
  75     public static final String StackMap                 = "StackMap";
  76     public static final String StackMapTable            = "StackMapTable";
  77     public static final String Synthetic                = "Synthetic";
  78 
  79     public static class Factory {
  80         public Factory() {
  81             // defer init of standardAttributeClasses until after options set up
  82         }
  83 
  84         public Attribute createAttribute(ClassReader cr, int name_index, byte[] data)
  85                 throws IOException {
  86             if (standardAttributes == null) {
  87                 init();
  88             }
  89 
  90             ConstantPool cp = cr.getConstantPool();


 119             standardAttributes.put(CharacterRangeTable, CharacterRangeTable_attribute.class);
 120             standardAttributes.put(Code,              Code_attribute.class);
 121             standardAttributes.put(CompilationID,     CompilationID_attribute.class);
 122             standardAttributes.put(ConstantValue,     ConstantValue_attribute.class);
 123             standardAttributes.put(Deprecated,        Deprecated_attribute.class);
 124             standardAttributes.put(EnclosingMethod,   EnclosingMethod_attribute.class);
 125             standardAttributes.put(Exceptions,        Exceptions_attribute.class);
 126             standardAttributes.put(InnerClasses,      InnerClasses_attribute.class);
 127             standardAttributes.put(LineNumberTable,   LineNumberTable_attribute.class);
 128             standardAttributes.put(LocalVariableTable, LocalVariableTable_attribute.class);
 129             standardAttributes.put(LocalVariableTypeTable, LocalVariableTypeTable_attribute.class);
 130             standardAttributes.put(MethodParameters,  MethodParameters_attribute.class);
 131             standardAttributes.put(Module,            Module_attribute.class);
 132             standardAttributes.put(ModuleHashes,      ModuleHashes_attribute.class);
 133             standardAttributes.put(ModuleMainClass,   ModuleMainClass_attribute.class);
 134             standardAttributes.put(ModulePackages,    ModulePackages_attribute.class);
 135             standardAttributes.put(ModuleResolution,  ModuleResolution_attribute.class);
 136             standardAttributes.put(ModuleTarget,      ModuleTarget_attribute.class);
 137             standardAttributes.put(NestHost, NestHost_attribute.class);
 138             standardAttributes.put(NestMembers, NestMembers_attribute.class);
 139             standardAttributes.put(Record, Record_attribute.class);
 140             standardAttributes.put(RuntimeInvisibleAnnotations, RuntimeInvisibleAnnotations_attribute.class);
 141             standardAttributes.put(RuntimeInvisibleParameterAnnotations, RuntimeInvisibleParameterAnnotations_attribute.class);
 142             standardAttributes.put(RuntimeVisibleAnnotations, RuntimeVisibleAnnotations_attribute.class);
 143             standardAttributes.put(RuntimeVisibleParameterAnnotations, RuntimeVisibleParameterAnnotations_attribute.class);
 144             standardAttributes.put(RuntimeVisibleTypeAnnotations, RuntimeVisibleTypeAnnotations_attribute.class);
 145             standardAttributes.put(RuntimeInvisibleTypeAnnotations, RuntimeInvisibleTypeAnnotations_attribute.class);
 146             standardAttributes.put(PermittedSubtypes, PermittedSubtypes_attribute.class);
 147             standardAttributes.put(Signature,         Signature_attribute.class);
 148             standardAttributes.put(SourceDebugExtension, SourceDebugExtension_attribute.class);
 149             standardAttributes.put(SourceFile,        SourceFile_attribute.class);
 150             standardAttributes.put(SourceID,          SourceID_attribute.class);
 151             standardAttributes.put(StackMap,          StackMap_attribute.class);
 152             standardAttributes.put(StackMapTable,     StackMapTable_attribute.class);
 153             standardAttributes.put(Synthetic,         Synthetic_attribute.class);
 154         }
 155 
 156         private Map<String,Class<? extends Attribute>> standardAttributes;
 157     }
 158 
 159     public static Attribute read(ClassReader cr) throws IOException {
 160         return cr.readAttribute();
 161     }
 162 
 163     protected Attribute(int name_index, int length) {
 164         attribute_name_index = name_index;
 165         attribute_length = length;
 166     }


 186         R visitCharacterRangeTable(CharacterRangeTable_attribute attr, P p);
 187         R visitCode(Code_attribute attr, P p);
 188         R visitCompilationID(CompilationID_attribute attr, P p);
 189         R visitConstantValue(ConstantValue_attribute attr, P p);
 190         R visitDeprecated(Deprecated_attribute attr, P p);
 191         R visitEnclosingMethod(EnclosingMethod_attribute attr, P p);
 192         R visitExceptions(Exceptions_attribute attr, P p);
 193         R visitInnerClasses(InnerClasses_attribute attr, P p);
 194         R visitLineNumberTable(LineNumberTable_attribute attr, P p);
 195         R visitLocalVariableTable(LocalVariableTable_attribute attr, P p);
 196         R visitLocalVariableTypeTable(LocalVariableTypeTable_attribute attr, P p);
 197         R visitMethodParameters(MethodParameters_attribute attr, P p);
 198         R visitModule(Module_attribute attr, P p);
 199         R visitModuleHashes(ModuleHashes_attribute attr, P p);
 200         R visitModuleMainClass(ModuleMainClass_attribute attr, P p);
 201         R visitModulePackages(ModulePackages_attribute attr, P p);
 202         R visitModuleResolution(ModuleResolution_attribute attr, P p);
 203         R visitModuleTarget(ModuleTarget_attribute attr, P p);
 204         R visitNestHost(NestHost_attribute attr, P p);
 205         R visitNestMembers(NestMembers_attribute attr, P p);
 206         R visitRecord(Record_attribute attr, P p);
 207         R visitRuntimeVisibleAnnotations(RuntimeVisibleAnnotations_attribute attr, P p);
 208         R visitRuntimeInvisibleAnnotations(RuntimeInvisibleAnnotations_attribute attr, P p);
 209         R visitRuntimeVisibleParameterAnnotations(RuntimeVisibleParameterAnnotations_attribute attr, P p);
 210         R visitRuntimeInvisibleParameterAnnotations(RuntimeInvisibleParameterAnnotations_attribute attr, P p);
 211         R visitRuntimeVisibleTypeAnnotations(RuntimeVisibleTypeAnnotations_attribute attr, P p);
 212         R visitRuntimeInvisibleTypeAnnotations(RuntimeInvisibleTypeAnnotations_attribute attr, P p);
 213         R visitPermittedSubtypes(PermittedSubtypes_attribute attr, P p);
 214         R visitSignature(Signature_attribute attr, P p);
 215         R visitSourceDebugExtension(SourceDebugExtension_attribute attr, P p);
 216         R visitSourceFile(SourceFile_attribute attr, P p);
 217         R visitSourceID(SourceID_attribute attr, P p);
 218         R visitStackMap(StackMap_attribute attr, P p);
 219         R visitStackMapTable(StackMapTable_attribute attr, P p);
 220         R visitSynthetic(Synthetic_attribute attr, P p);
 221     }
 222 }
< prev index next >