question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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:closed
  • Created 3 years ago
  • Comments:18 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
lastrixcommented, Dec 14, 2020

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.

1reaction
lukehutchcommented, Dec 14, 2020

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ClassGraph - GitHub
The following code prints the name of all classes in the package com.xyz or its subpackages, anywhere on the classpath or module path,...
Read more >
ClassGraph on Open Liberty doesn't find any classes ... - GitHub
package io.openliberty.guides.hello; import io.github.classgraph. ... extends HttpServlet { private static final long serialVersionUID = 1L; ...
Read more >
classgraph/classgraph · GitHub
An uber-fast parallelized Java classpath scanner and module scanner. - classgraph/PlexusClassWorldsClassRealmClassLoaderHandler.java at latest ...
Read more >
java.lang.IllegalAccessError: class nonapi.io.github ...
Hello, I have a class uses CLASSGRAPH to to locate classes with given annotation: import java.lang.annotation.Annotation; import java.util.
Read more >
spring boot 2.2: newest classgraph is not loaded #133 - GitHub
Hi,. Coudl you please review your application dependencies: Your commande, shows that you load springdoc-openapi-core twice. [INFO] | +- (org.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found