Bug 79597 - [1.5] APIs for disassembling 1.5 attributes need to be cleanup
Summary: [1.5] APIs for disassembling 1.5 attributes need to be cleanup
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Jim des Rivieres CLA
QA Contact:
URL:
Whiteboard:
Keywords: api
Depends on:
Blocks:
 
Reported: 2004-11-26 16:05 EST by Olivier Thomann CLA
Modified: 2005-05-11 08:45 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2004-11-26 16:05:03 EST
Some APIs that have been added to handle 1.5 atttributes need to be cleanup.
Some names have changed in the latest JVM specs since 3.0.
These API should not be used by clients yet as they are related to 1.5 code.
Comment 1 Olivier Thomann CLA 2004-11-26 16:09:52 EST
Released first batch of changes.
IAnnotation
   added getTypeName()
IAnnotationComponentValue
   renamed getAttributeValue() into getAnnotationValue()
   getAttributeValue() has been deprecated and will be remove after 3.1M4
   added char[] getEnumConstantName()
   added char[] getEnumConstantTypeName()

Jim,

Are these changes ok for you?
Comment 2 Jim des Rivieres CLA 2004-12-02 16:04:00 EST
These look fine. A more general question re: all these methods.
There are a couple of ways to interpret "This is initialized only if the tag 
item is X.".
(a) The client may assume that null will be returned if the tag item is not X.
(b) The client must not call this method if the tag item is not X.
Since clients may implement this method, it's important to be clear what the 
contract is. I'd suggest reading (a).
Comment 3 Olivier Thomann CLA 2005-01-06 16:44:48 EST
Jim, a) is doable for the IAnnotationComponentValue, but it is not doable for
the IConstantPoolEntry class where some methods don't return an object.
I will change the implementation to return null when the constant is not the
expected one for the IAnnotationComponentValue.
Comment 4 Olivier Thomann CLA 2005-01-06 17:21:30 EST
Clarified API.
Jim, please review them.
IAnnotationComponentValue and IConstantPoolEntry.
Comment 5 Jim des Rivieres CLA 2005-04-21 00:03:16 EDT
Specs as fine. Closing.
Comment 6 Olivier Thomann CLA 2005-05-11 08:45:27 EDT
Verified.