// Path: core/src/main/java/com/github/phantomthief/util/StackTraceProviderJdk8.java
// static final String[] REFLECTION_PREFIXES = {"sun.reflect.", "java.lang.reflect.", "jdk.internal.reflect."};


import static com.github.phantomthief.util.StackTraceProviderJdk8.REFLECTION_PREFIXES;
import static java.lang.StackWalker.Option.RETAIN_CLASS_REFERENCE;
import java.lang.StackWalker.StackFrame;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Stream;
import javax.annotation.Nullable;
import org.apache.commons.lang3.StringUtils;
                                return false;
                            }
                            if (afterSelf) {
                                if (deprecatedClass == null) {
                                    deprecatedClass = declaringClass;
                                }
                            }
                            if (declaringClass == deprecatedClass) {
                                afterDeprecated = true;
                                return false;
                            }
                            if (ignore.test(declaringClass.getName())) {
                                return false;
                            }
                            return afterDeprecated;
                        })
                        .findAny()
                        .map(StackFrame::toStackTraceElement)
                        .orElse(null);
            }
        });
    }

    /**
     * at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     * at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     * at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     * at java.base/java.lang.reflect.Method.invoke(Method.java:566)
     */
    private boolean isReflection(String className) {
// Path: core/src/main/java/com/github/phantomthief/util/StackTraceProviderJdk8.java
// static final String[] REFLECTION_PREFIXES = {"sun.reflect.", "java.lang.reflect.", "jdk.internal.reflect."};


// Path: core-jdk9/src/main/java/com/github/phantomthief/util/StackTraceProviderJdk9.java
import static com.github.phantomthief.util.StackTraceProviderJdk8.REFLECTION_PREFIXES;
import static java.lang.StackWalker.Option.RETAIN_CLASS_REFERENCE;
import java.lang.StackWalker.StackFrame;
import java.util.function.Function;
import java.util.function.Predicate;
import java.util.stream.Stream;
import javax.annotation.Nullable;
import org.apache.commons.lang3.StringUtils;

                                return false;
                            }
                            if (afterSelf) {
                                if (deprecatedClass == null) {
                                    deprecatedClass = declaringClass;
                                }
                            }
                            if (declaringClass == deprecatedClass) {
                                afterDeprecated = true;
                                return false;
                            }
                            if (ignore.test(declaringClass.getName())) {
                                return false;
                            }
                            return afterDeprecated;
                        })
                        .findAny()
                        .map(StackFrame::toStackTraceElement)
                        .orElse(null);
            }
        });
    }

    /**
     * at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     * at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
     * at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
     * at java.base/java.lang.reflect.Method.invoke(Method.java:566)
     */
    private boolean isReflection(String className) {
        return StringUtils.startsWithAny(className, REFLECTION_PREFIXES);