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

io.cucumber.core.backend.SourceReference Maven / Gradle / Ivy

The newest version!
package io.cucumber.core.backend;

import java.lang.reflect.Method;

public interface SourceReference {

    static SourceReference fromMethod(Method method) {
        return new JavaMethodReference(
            method.getDeclaringClass(),
            method.getName(),
            method.getParameterTypes());
    }

    static SourceReference fromStackTraceElement(StackTraceElement stackTraceElement) {
        return new StackTraceElementReference(
            stackTraceElement.getClassName(),
            stackTraceElement.getMethodName(),
            stackTraceElement.getFileName(),
            stackTraceElement.getLineNumber());
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy