-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Callback (cb_
) name collision when binding methods with identical signatures and Java names
#1155
Comments
jpobst
added
bug
Component does not function as intended
generator
Issues binding a Java library (generator, class-parse, etc.)
labels
Oct 26, 2023
jpobst
changed the title
Binding 2 methods with the same signature (the same name and parameters), but different return types
Callback (Oct 26, 2023
cb_
) name collision when binding methods with identical signatures and Java names
Class <class abstract="false" deprecated="not deprecated" extends="com.google.mlkit.vision.objects.ObjectDetectorOptionsBase.Builder" extends-generic-aware="com.google.mlkit.vision.objects.ObjectDetectorOptionsBase.Builder<com.google.mlkit.vision.objects.defaults.ObjectDetectorOptions.Builder>" jni-extends="Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase$Builder;" final="false" name="ObjectDetectorOptions.Builder" static="true" visibility="public" jni-signature="Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions$Builder;">
<constructor deprecated="not deprecated" final="false" name="ObjectDetectorOptions.Builder" jni-signature="()V" bridge="false" static="false" type="com.google.mlkit.vision.objects.defaults.ObjectDetectorOptions.Builder" synthetic="false" visibility="public" />
<method abstract="false" deprecated="not deprecated" final="false" name="build" jni-signature="()Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions;" bridge="false" native="false" return="com.google.mlkit.vision.objects.defaults.ObjectDetectorOptions" jni-return="Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions;" static="false" synchronized="false" synthetic="false" visibility="public" return-not-null="true" />
<method abstract="false" deprecated="not deprecated" final="true" name="build" jni-signature="()Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase;" bridge="true" native="false" return="com.google.mlkit.vision.objects.ObjectDetectorOptionsBase" jni-return="Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase;" static="false" synchronized="false" synthetic="true" visibility="public" return-not-null="true" />
<method abstract="false" deprecated="not deprecated" final="false" name="enableClassification" jni-signature="()Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions$Builder;" bridge="false" native="false" return="com.google.mlkit.vision.objects.defaults.ObjectDetectorOptions.Builder" jni-return="Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions$Builder;" static="false" synchronized="false" synthetic="false" visibility="public" return-not-null="true" />
<method abstract="false" deprecated="not deprecated" final="true" name="enableClassification" jni-signature="()Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase$Builder;" bridge="true" native="false" return="java.lang.Object" jni-return="Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase$Builder;" static="false" synchronized="false" synthetic="true" visibility="public" return-not-null="true" />
<method abstract="false" deprecated="not deprecated" final="false" name="enableMultipleObjects" jni-signature="()Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions$Builder;" bridge="false" native="false" return="com.google.mlkit.vision.objects.defaults.ObjectDetectorOptions.Builder" jni-return="Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions$Builder;" static="false" synchronized="false" synthetic="false" visibility="public" return-not-null="true" />
<method abstract="false" deprecated="not deprecated" final="true" name="enableMultipleObjects" jni-signature="()Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase$Builder;" bridge="true" native="false" return="java.lang.Object" jni-return="Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase$Builder;" static="false" synchronized="false" synthetic="true" visibility="public" return-not-null="true" />
<method abstract="false" deprecated="not deprecated" final="false" name="setDetectorMode" jni-signature="(I)Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions$Builder;" bridge="false" native="false" return="com.google.mlkit.vision.objects.defaults.ObjectDetectorOptions.Builder" jni-return="Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions$Builder;" static="false" synchronized="false" synthetic="false" visibility="public" return-not-null="true">
<parameter name="detectorMode" type="int" jni-type="I" />
</method>
<method abstract="false" deprecated="not deprecated" final="true" name="setDetectorMode" jni-signature="(I)Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase$Builder;" bridge="true" native="false" return="java.lang.Object" jni-return="Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase$Builder;" static="false" synchronized="false" synthetic="true" visibility="public" return-not-null="true">
<parameter name="p0" type="int" jni-type="I" />
</method>
<method abstract="false" deprecated="not deprecated" final="false" name="setExecutor" jni-signature="(Ljava/util/concurrent/Executor;)Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions$Builder;" bridge="false" native="false" return="com.google.mlkit.vision.objects.defaults.ObjectDetectorOptions.Builder" jni-return="Lcom/google/mlkit/vision/objects/defaults/ObjectDetectorOptions$Builder;" static="false" synchronized="false" synthetic="false" visibility="public" return-not-null="true">
<parameter name="executor" type="java.util.concurrent.Executor" jni-type="Ljava/util/concurrent/Executor;" not-null="true" />
</method>
<method abstract="false" deprecated="not deprecated" final="true" name="setExecutor" jni-signature="(Ljava/util/concurrent/Executor;)Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase$Builder;" bridge="true" native="false" return="java.lang.Object" jni-return="Lcom/google/mlkit/vision/objects/ObjectDetectorOptionsBase$Builder;" static="false" synchronized="false" synthetic="true" visibility="public" return-not-null="true">
<parameter name="p0" type="java.util.concurrent.Executor" jni-type="Ljava/util/concurrent/Executor;" not-null="true" />
</method>
</class> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Context:
In bindings we generate
cb_*
(delegates, etc ) stuff based on native types.Now in the case when 2 methods with the same name and the same parameters, but different return types exist, renaming
managedName
does not help because there are 2 sets ofcb_*
variables.There are 2 potentional workarounds:
generating
cb_*
based on managed names and typesaddding return type to
cb_*
Curently user has to remove both methods.
Discord comments:
The text was updated successfully, but these errors were encountered: