In Java defined by an object, is it possible to override one of the methods?

I have an object of class A. I want to override one of the methods of this class. It can be done?

In particular, I have an object that is entered in a field. I need to override one of the methods before I can use it.

I am trying to figure out if Reflection will solve the problem. Please note that the method I'm trying to override is independent of the private variables of this class.

+3
source share
4 answers
+5
source
+3

.

, , . , , , .

, , - .

+3

, , : . , , . , . , , "" .

, , , AOP.

, .

+3

Source: https://habr.com/ru/post/1704513/


All Articles