I wanted to know if there is any way to get the class that called a method within that method. For example:
public class A {
public void metodoA() {
B.metodoB();
}
}
public static B {
public void metodoB() {
//Aqui, de alguma forma, pegar a classe A, quando ela chamar
}
}
Is there a possibility in Java, or would I need to send the class as a parameter to metodoB
?