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?

Thanks,
Chris


On 10/9/13 10:00 AM, "Eric Pyle" <eric.p...@cd-adapco.com> wrote:

>This is the doc for the extended JDK used by Groovy:
>
>http://groovy.codehaus.org/groovy-jdk/
>
>I use this regularly when writing Groovy scripts, which I am still
>getting the hang of.
>
>Eric
>
>On 10/9/2013 11:03 AM, Chris Cooper wrote:
>> Thanks!
>>
>> But I can ask for Thread.currentThread().executable and 'executable' is
>> not a member of the Java Thread class, which means
>>Thread.currentThread()
>> is returning some sub-class of Thread (which is hardly surprising).
>>
>> Again though, I'm not looking for an answer to "what type of object is
>> Thread.currentThread()", what I'm looking for is "Where is the online
>> documentation that tells me what type of object Thread.currentThread()
>>is"
>> so I don't have to post a new query every time I have a new question Š
>>
>> Chris
>>
>> On 10/8/13 10:28 PM, "Samuli Saarinen" <samuli.saari...@remion.com>
>>wrote:
>>
>>> Hi,
>>>
>>> AFAIK you have access to the whole JVM and you can do pretty much
>>> anything. As for your examples just give it a try. java.lang.* is
>>> automatically imported so you could eg. run the following script:
>>> println("getenv: " + System.getenv())
>>> println("current thread: " + Thread.currentThread())
>>>
>>> For further Groovy reference see http://groovy.codehaus.org/Home
>>>
>>> BR,
>>> Samuli
>>>
>>>
>>> -----Original Message-----
>>> From: jenkinsci-users@googlegroups.com
>>> [mailto:jenkinsci-users@googlegroups.com] On Behalf Of cscooper
>>> Sent: 9. lokakuuta 2013 1:36
>>> To: jenkinsci-users@googlegroups.com
>>> Subject: Groovy objects?
>>>
>>> I'm new to Groovy scripting in Jenkins and I'm not clear on what
>>>objects
>>> are available.
>>>
>>> For example, in my System Groovy Script I'm allowed to refer to
>>> System.getenv() and Thread.currentThread() but what classes are the
>>> System and Thread objects?  Where can I find documentation so I know
>>>what
>>> cool things I can do?
>>>
>>> Thanks,
>>> Chris
>>>
>>>
>>>
>>>
>>> --
>>> View this message in context:
>>> http://jenkins-ci.361315.n4.nabble.com/Groovy-objects-tp4678652.html
>>> Sent from the Jenkins users mailing list archive at Nabble.com.
>>>
>>> --
>>> 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 jenkinsci-users+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>>>
>>> -- 
>>> 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 jenkinsci-users+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/groups/opt_out.
>
>-- 
>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 jenkinsci-users+unsubscr...@googlegroups.com.
>For more options, visit https://groups.google.com/groups/opt_out.

-- 
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 jenkinsci-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to