How find the Class of argument when this one is a primitive?

I try to check the class of argument to create a method builder, but when the case the argument is primitive, i don’t find a way to do that ?

My code who’s don’t work !!!

void setup() {
  Truc t = new Truc();
  int value = 0;
  println(value == Integer.TYPE);

class Truc {

The 8 Java primitive datatypes aren’t objects/references/pointers in any way. :monkey:
They’ve got no members & the access . operator can’t be used on them! :no_entry_sign:

Damn it !!! That’s was to make a system for the callback… That’s possible with Java 11 ? Because I believe the next Processing have a chance to turn with Java 11.

Finally I find a way to test :

int val = 1;
void setup() {
void test(Object obj) {
// print: class java.lang.Integer

Of int there exists a object Int that I use in several places or Integer

Notice that datatype Integer isn’t the same as the primitive datatype int . :no_good_man:

Rather it’s an object wrapper/box for an int primitive value: :inbox_tray:

The actual class that’d represent an int is int.class, not Integer.class. :face_with_monocle:

At the end and class java.lang.Integer can do a same job ? if Yes that’s ok for me.

Don’t understand what you mean ?

never mind