io.github.classgraph.MethodTypeSignature#getTypeParameters is package private
See original GitHub issue /** * Get the type parameters for the method. N.B. this is non-public, since the types have to be aligned with * other parameter metadata. The type of a parameter can be obtained post-alignment from the parameter's * {@link MethodParameterInfo} object. * * @return The type parameters for the method. */ List<TypeParameter> getTypeParameters() { return typeParameters; }
The TypeParameters could not be fetched through MethodParameterInfo because it has no connection (TypeParameter can only be declared in class or method). Since this description is same as for getParameterTypeSignatures
/** * Get the type signatures of the method parameters. N.B. this is non-public, since the types have to be aligned * with other parameter metadata. The type of a parameter can be obtained post-alignment from the parameter's * {@link MethodParameterInfo} object. * * @return The parameter types for the method, as {@link TypeSignature} parsed type objects. */ List<TypeSignature> getParameterTypeSignatures() { return parameterTypeSignatures; }
I could see this as typo.
Also, i should note that same method (getTypeParameters) for classInfo is public:
/** * Get the type parameters for the class. * * @return The type parameters for the class. */ public List<TypeParameter> getTypeParameters() { return typeParameters; }
please add public modifier to io.github.classgraph.MethodTypeSignature#getTypeParameters
Issue Analytics
- State:
- Created 3 years ago
- Comments:18 (11 by maintainers)
Top GitHub Comments
No-no, you was great, i saw that you try to convince me about your point. I’m greatful for your job, if i somehow hurt you - i’m really sorry. I tried to tell you that i have no excuse for impatience, because what i saw - you can’t understand what i’m talking about because of my poor english or lack of info.
Anyway, thanks you. You are breathtaking.
I hardly think I was impatient here, I produced several examples for you, and turned around this bug for you to a new release in less than a day. I was misguided though, because I had some flawed assumptions about what this Java language feature was actually used for. I thought nobody would ever need to access this generic type except through parameter types and the return type, because I thought it served no other purpose. Actually I still think that that’s the only way a method’s generic type parameter is actually useful, if it’s used as a formal parameter’s type – but you were right that the getter needed to be public.