Skip to content

MethodInfo.typeDescriptorStr is useful but is private #380

@rankinc

Description

@rankinc
MethodInfo {

    /**
     * The JVM-internal type descriptor (missing type parameters, but including types for synthetic and mandated
     * method parameters).
     */
    private String typeDescriptorStr;

}

This field is useful precisely because it is read directly from the. Java classfile without being filtered through ClassGraph's "presentation layer" i.e. MethodTypeSignature.toString(), whose output cannot be relied upon to remain constant as ClassGraph evolves.

A supported API for retrieving the internal type descriptor string would spare me from finding ways to extract it via reflection.

And ditto for Fieldinfo.typeDescriptorStr, most likely.

Background
We need to be able to configure our tool to be able to ignore certain class methods, some of which are synthetic Kotlin methods which cannot be annotated. Therefore the only reliable way of identifying these methods is by their name + internal descriptor.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions