From d4e8ecc3b4f68b86d95ec951971a0fea20217988 Mon Sep 17 00:00:00 2001 From: Sven Gothel Date: Fri, 4 Aug 2023 00:14:42 +0200 Subject: JavaEmitter: Encapsulate 'needsJavaCallbackCode' query in JavaConfiguration. TBD: Is this even required? - needsIntermediateOperation -> needsJavaCallbackCode - Use JavaConfiguration.requiresJavaCallbackCode(..) TBD: Is this even required? As far as I see, the non-userParam callback case adds no additional code requirements. Both, callback with and without userParam shares same code path and the respective native static fields. Only that the non-userParam code path adds additional native static fields, but all code sections are produced in both cases. --- src/java/com/jogamp/gluegen/JavaConfiguration.java | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/java/com/jogamp/gluegen/JavaConfiguration.java') diff --git a/src/java/com/jogamp/gluegen/JavaConfiguration.java b/src/java/com/jogamp/gluegen/JavaConfiguration.java index 6d0eae5..95e1480 100644 --- a/src/java/com/jogamp/gluegen/JavaConfiguration.java +++ b/src/java/com/jogamp/gluegen/JavaConfiguration.java @@ -2518,4 +2518,10 @@ public class JavaConfiguration { /* pp */ final Map setFuncToJavaCallbackMap = new HashMap(); final Set emittedJavaCallbackUserParamClasses = new HashSet(); + /** Returns true if a method binding requires specific java callback code */ + final boolean requiresJavaCallbackCode(final String bindingName) { + final JavaCallbackInfo jcbi = setFuncToJavaCallbackMap.get(bindingName); + return null != jcbi && !jcbi.cbUserParamIsDefined; + } + } -- cgit v1.2.3