dimanche 15 octobre 2023

Get a pointer to a class field inside a class in Java

public class Example {
   private String field_;
   private Stack stack_;
   public void Metod() {
       Field field = this.getField("field_"); !!!! 
   }
}

I want to save a pointer to a class field on the stack, but I don't understand how to get this pointer. I tried using getField, but it didn't work.





Aucun commentaire:

Enregistrer un commentaire