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

io.quarkus.runtime.NativeImageFeatureUtils Maven / Gradle / Ivy

The newest version!
package io.quarkus.runtime;

import java.lang.reflect.Method;

public class NativeImageFeatureUtils {

    public static Method lookupMethod(Class declaringClass, String methodName, Class... parameterTypes)
            throws NoSuchMethodException {
        Method result = declaringClass.getDeclaredMethod(methodName, parameterTypes);
        result.setAccessible(true);
        return result;
    }

    public static Module findModule(String moduleName) {
        if (moduleName == null) {
            return ClassLoader.getSystemClassLoader().getUnnamedModule();
        }
        return ModuleLayer.boot().findModule(moduleName).orElseThrow();
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy