src/share/vm/classfile/classFileParser.hpp

Print this page




 116     _transitive_interfaces = NULL;
 117     _combined_annotations = NULL;
 118     _annotations = _type_annotations = NULL;
 119     _fields_annotations = _fields_type_annotations = NULL;
 120   }
 121 
 122   class AnnotationCollector {
 123   public:
 124     enum Location { _in_field, _in_method, _in_class };
 125     enum ID {
 126       _unknown = 0,
 127       _method_CallerSensitive,
 128       _method_ForceInline,
 129       _method_DontInline,
 130       _method_InjectedProfile,
 131       _method_LambdaForm_Compiled,
 132       _method_LambdaForm_Hidden,
 133       _method_HotSpotIntrinsicCandidate,
 134       _sun_misc_Contended,
 135       _field_Stable,

 136       _annotation_LIMIT
 137     };
 138     const Location _location;
 139     int _annotations_present;
 140     u2 _contended_group;
 141 
 142     AnnotationCollector(Location location)
 143     : _location(location), _annotations_present(0)
 144     {
 145       assert((int)_annotation_LIMIT <= (int)sizeof(_annotations_present) * BitsPerByte, "");
 146     }
 147     // If this annotation name has an ID, report it (or _none).
 148     ID annotation_index(ClassLoaderData* loader_data, Symbol* name);
 149     // Set the annotation name:
 150     void set_annotation(ID id) {
 151       assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob");
 152       _annotations_present |= nth_bit((int)id);
 153     }
 154 
 155     void remove_annotation(ID id) {




 116     _transitive_interfaces = NULL;
 117     _combined_annotations = NULL;
 118     _annotations = _type_annotations = NULL;
 119     _fields_annotations = _fields_type_annotations = NULL;
 120   }
 121 
 122   class AnnotationCollector {
 123   public:
 124     enum Location { _in_field, _in_method, _in_class };
 125     enum ID {
 126       _unknown = 0,
 127       _method_CallerSensitive,
 128       _method_ForceInline,
 129       _method_DontInline,
 130       _method_InjectedProfile,
 131       _method_LambdaForm_Compiled,
 132       _method_LambdaForm_Hidden,
 133       _method_HotSpotIntrinsicCandidate,
 134       _sun_misc_Contended,
 135       _field_Stable,
 136       _vm_annotation_ReservedStackAccess,
 137       _annotation_LIMIT
 138     };
 139     const Location _location;
 140     int _annotations_present;
 141     u2 _contended_group;
 142 
 143     AnnotationCollector(Location location)
 144     : _location(location), _annotations_present(0)
 145     {
 146       assert((int)_annotation_LIMIT <= (int)sizeof(_annotations_present) * BitsPerByte, "");
 147     }
 148     // If this annotation name has an ID, report it (or _none).
 149     ID annotation_index(ClassLoaderData* loader_data, Symbol* name);
 150     // Set the annotation name:
 151     void set_annotation(ID id) {
 152       assert((int)id >= 0 && (int)id < (int)_annotation_LIMIT, "oob");
 153       _annotations_present |= nth_bit((int)id);
 154     }
 155 
 156     void remove_annotation(ID id) {