All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.smallrye.faulttolerance.autoconfig.MethodDescriptor Maven / Gradle / Ivy

There is a newer version: 6.4.1
Show newest version
package io.smallrye.faulttolerance.autoconfig;

import java.lang.reflect.Method;

public class MethodDescriptor {
    public Class declaringClass;
    public String name;
    public Class[] parameterTypes;
    public Class returnType;

    @Override
    public String toString() {
        StringBuilder result = new StringBuilder();
        result.append(declaringClass.getName()).append('.').append(name).append('(');
        boolean firstParam = true;
        for (Class parameterType : parameterTypes) {
            if (!firstParam) {
                result.append(", ");
            }
            result.append(parameterType.getName());
            firstParam = false;
        }
        result.append(')');
        return result.toString();
    }

    public Method reflect() throws NoSuchMethodException {
        return declaringClass.getDeclaredMethod(name, parameterTypes);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy