Posted on 2005-05-09
Still getting use to Java (Moved over from C/C++ and C#)
Basically I have a trace mechanism here that checks when a method is entered and exited, it allows me to actively debug my code, especially when problems are found. (Extremely helpful since I am new to java)
Basically I have a problem with Indirection, where a we do a check for the calling class (and we get the trace class).
public static void traceEn(Object myObject, String myMethod)
String obj = myObject.getClass().getName();
obj = obj.substring(PACKAGE_LENGTH);
String myString = obj+ ";" +myMethod+ ";" +Thread.currentThread();
//Calls tracer method to log the trace
Towards the bottom of the class file I have
final public static void enter( Object inObject )
I think I am getting muddled somewhere in this lot, and loosing the plot. As I know a certain method is calling this, and it merely picks up its own class and methods.