CadixDev / Bombe

A model of Java types, as per the JVMS specification.
BSD 3-Clause "New" or "Revised" License
6 stars 6 forks source link

Refactor Field/MethodSignature constructors #4

Closed stephan-gh closed 6 years ago

stephan-gh commented 6 years ago

Right now they are rather confusing in my opinion. MethodDescriptor uses of for the method that does additional parsing, but FieldSignature and MethodSignature have it directly in their constructor.

I think having it in Field/MethodSignature.of as well makes it more clear that additional parsing is done there. I've also added MethodSignature.of(String nameAndDescriptor) which accepts a concatenated method name and descriptor (e.g. isChunkLoaded(IIZ)Z)