On Fri, 3 Feb 2023 18:37:43 GMT, Maurizio Cimadamore <mcimadam...@openjdk.org> 
wrote:

>> Adam Sotona has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Classfile API moved under jdk.internal.classfile package
>
> src/java.base/share/classes/jdk/internal/classfile/ClassSignature.java line 
> 34:
> 
>> 32:  * Models the generic signature of a class file, as defined by JVMS 
>> 4.7.9.
>> 33:  */
>> 34: public sealed interface ClassSignature
> 
> It is a bit odd to have Signature and XYZSignature in the API with the latter 
> not extending the former. I think I get what the API is aiming for though - 
> e.g. Signature is for modelling low-level "portions" of the signature 
> attributes, whereas ClassSignature, MethodSignature and friends are there to 
> model the signature attribute attached to a class, method, etc.

The confusion come from simplified name. Signature probably should be called 
JavaTypeSignature according to the spec. ClassSignature and MethodSignature 
could not extend it, as it would not respect the reality. Each of them are 
completely different species. Signature (or JavaTypeSignature) on the other 
side has many sub-types.

-------------

PR: https://git.openjdk.org/jdk/pull/10982

Reply via email to