Using Les' suggestion of brute force search, I did the following:

grep -r "currentThread();" * > ../../Documents/currentThread.txt

This gives me source code lines that reference currentThread(). Looking through these, you can see that currentThread returns a Thread object, which is sometimes an instance of Executor. From core/src/main/java/hudson/model/Run.java:

        Thread t = Thread.currentThread();
        if (t instanceof Executor) {
            Executor e = (Executor) t;

If you know you want to find where an Executor comes from, you can search for " Executor ". That returns matches in a number of files, including Executor.java, which will also yield the code above. Not exactly a simple look-up, but it does seem possible.

Eric

On 10/9/2013 12:26 PM, Les Mikesell wrote:
On Wed, Oct 9, 2013 at 11:04 AM, Chris Cooper
<[email protected]> wrote:
We're getting closer (grin)!

Let me ask a specific question:

In my Jenkins system script, Thread.currentThread() returns an object of
type hudson.model.Executor.  I know this because in my Groovy script I
assigned Thread.currentThread() to an untyped variable (a "def") and then
did a println thr.getClass().getName().

Is there any way to get this information from any online documentation?
Or is the 'println' method the only way?
There's the online javadocs:
http://javadoc.jenkins-ci.org/

Or if you like brute force, you can download the source and feed it to
something like OpenGrok.  And speaking of OpenGrok, has anyone set up
jenkins jobs to keep OpenGrok views of source up to date?


--
You received this message because you are subscribed to the Google Groups "Jenkins 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to