Answer the question
In order to leave comments, you need to log in
How to modify a method in java at RUNTIME?
There is a method
class Foo{
public void printName(){
System.out.println( "Foo");
// Сюда должна добавиться System.out.println( "Время вызова метода"
// +System.currentTimeMillis() );
}
}
Foo f=new Foo();
f.getName(); // "Foo"
// "Время вызова метода" ....
// Всегда работаем только с базовым классом Foo не обертывая его.
Answer the question
In order to leave comments, you need to log in
It is possible, but extremely hemorrhoids and most likely the game will not cost the candle. See javasist.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question