1 year ago

#387977

test-img

Mxrlin

Get the Class of the called method in a method

Okay, so my POV is that I have one single Method of the Application. The Main Method, from where everything is getting executed. Now I have to try and get all Classes that are connected with that Class.

Example:

public static void main(String[] args) {
    
    TestClass.executeSomething();
    Text.start();
    
}

And now I have to get, via reflection or something, the 2 Subclasses used in that class. In that Example: "TestClass" and "Text".

Is that somehow possible? I thank for every answer.

java

class

methods

reflection

0 Answers

Your Answer

Accepted video resources