public static SourceLocation javaLocation() {
        for (StackTraceElement e : Thread.currentThread().getStackTrace()) {
            if (isStackTraceRelevant(e)) {
                if (e.getFileName() == null) {
                    return SourceLocation.none();
                }
                return new SourceLocation(e.getFileName(), e.getLineNumber(), 0);
            }
        }
        return SourceLocation.none();
    }
Returns the source code location of the caller. This is very helpful when determining where rules generated
from Java-based builders originated.

<p>Library-local and JDK stack frames are discarded. If no relevant location can be found,
`SourceLocation.none()` is returned.

@return The SourceLocation.
smithy-rules-engine/src/main/java/software/amazon/smithy/rulesengine/language/RulesComponentBuilder.java