From 8d24604707e5916e4acaf18e5f5acbb1d3c8b507 Mon Sep 17 00:00:00 2001 From: tueem Date: Tue, 15 Apr 2025 11:06:00 +0200 Subject: [PATCH] feat(factory): add utility method which does the "unchecked" cast --- .../java/net/tomatentum/cutin/ReflectedMethodFactory.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/src/main/java/net/tomatentum/cutin/ReflectedMethodFactory.java b/lib/src/main/java/net/tomatentum/cutin/ReflectedMethodFactory.java index 8432b54..bf2e060 100644 --- a/lib/src/main/java/net/tomatentum/cutin/ReflectedMethodFactory.java +++ b/lib/src/main/java/net/tomatentum/cutin/ReflectedMethodFactory.java @@ -31,5 +31,10 @@ public interface ReflectedMethodFactory { private ParserResults() {} + @SuppressWarnings("unchecked") + public T get(Class key) { + return (T) super.get(key); + } + } } \ No newline at end of file