Tried to extend from String class but it is final, hence looking for a way so that I can assign a String object as my custom class instance?
Example:
public class MyClass {
public CustomString cString;
}
MyClass myClass = new MyClass();
Field field = myClass.getField("cString");
field.set(myClass, "TestValue");
Aucun commentaire:
Enregistrer un commentaire