|
How can I find out what is in a Lookup |
|
|
Do not do any of these things in production code!
The simplest way is to call Lookup.toString(). If you want the output in a more readable form, do the following and print/format the resulting collection as you wish:
Lookup.Template tpl = new Lookup.Template (Object.class);
Lookup.Result result = theLookup.lookup (tpl);
Collection c = result.allInstances();
for (Iterator i=c.iterator(); i.hasNext();) {
Object o = i.next();
//do what you want
}
|
Source: NetBeans FAQ
Related Tips
|
Page 1 of 0 ( 0 comments )
You can share your information about this topic using the form below!
Please do not post your questions with this form! Thanks.