Use a nice toString() for posted Runnables.
git-svn-id: https://samskivert.googlecode.com/svn/trunk@2124 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -41,7 +41,10 @@ public class Invoker extends LoopingThread
|
||||
public long queueStamp;
|
||||
|
||||
/** The default constructor. */
|
||||
public Unit () {}
|
||||
public Unit ()
|
||||
{
|
||||
this("Unknown");
|
||||
}
|
||||
|
||||
/** Creates an invoker unit which will report the supplied name in
|
||||
* {@link #toString}. */
|
||||
@@ -88,7 +91,7 @@ public class Invoker extends LoopingThread
|
||||
return _name;
|
||||
}
|
||||
|
||||
protected String _name = "Unknown";
|
||||
protected String _name;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -131,6 +134,10 @@ public class Invoker extends LoopingThread
|
||||
r.run();
|
||||
return false;
|
||||
}
|
||||
|
||||
public String toString () {
|
||||
return "Posted Runnable: " + String.valueOf(r);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user