[The Java Posse] Re: What happened to the "consumer JRE" ?
Wow, talk about snatching defeat from the jaws of victory. Very disappointing (in the toolbar move). On Nov 12, 5:04 pm, Joshua Marinacci <[EMAIL PROTECTED]> wrote: > JavaSE 6 update 10 is the Consumer JRE > On Nov 11, 2008, at 6:48 PM, Michael Neale wrote: > > > > > Wasn't it supposed to provide a "flash like" plug in installation > > experience? Or is it not ready yet (and its not update 10? ). > > > Cause the flash like experience seems to be worlds away from the MSN > > toolbar experience for users (for most users, who are windows, on most > > browsers, which is IE, Java will mean installing MSN toolbar). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: UI design ideas ..
I thought that idea was not terribly popular any more - Eclipse kinda does it, and its sometimes held up as a bad example - always surprising users by showing/hiding things. On Nov 12, 3:50 pm, ranjith <[EMAIL PROTECTED]> wrote: > What would be the ideas to design a UI where the toolbar has to change > based on the perspective? The perspective, however, determines the > workflow that the application offers. So, the perspectives also should > get appropriate representation. > Currently I am thinking of something like below. > Suppose the perspectives are as "Edit", "Group" and "Print" > > Toolbar with edit perspective selected > > [[EDIT]] [GROUP] [PRINT] > > Toolbar with group perspective selected > > [EDIT] [[GROUP]] [PRINT] > > Toolbar with print perspective selected > > [EDIT] [GROUP] [[PRINT]] > > EDIT, GROUP and PRINT are tabs and rest is toolbar buttons > This way, the workflow is in focus. But this looks a bit primitive, > does anyone have some 'cool' ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] QCon Java Community Event in San Francisco on Nov 20
If you do not live in the San Francisco Bay Area and you are not attending QCon next week, then you can delete this message now. If you are still reading, please see announcement below for a Java Community Event during QCon San Francisco. Posse members that are not attending QCon that would like to attend this event can do so by following the registration link in forwarded message below and signing up before we reach the 100 person limit QCon set on participation by local Java developers that are *not* attending the conference. If you are attending the conference, please consider joining us on the evening of November 20th. This is also listed on the QCon San Francisco site here: http://qconsf.com/sf2008/events/ Cheers, Van P.S. You do not have to be a Silicon Valley Web JUG member to sign up. The invitation below was sent first to the local JUG members per our arrangement with the QCon organizers. -- Forwarded message -- From: Van Riper <[EMAIL PROTECTED]> Date: Sun, Nov 9, 2008 at 8:51 PM Subject: QCon Java Community Event in San Francisco on Nov 20 To: SV-WEB-JUG <[EMAIL PROTECTED]> QCon San Francisco has invited our JUG members to a Java Community Event on Thursday November 20th, 2008. This free event will be a one-hour long panel on the State of Java with well known Java luminaries and QCon SF speakers such as: - Rod Johnson: Creator of Spring - Brian Goetz: Java Concurrency Author and JSR EG Member - Emmanuel Bernard: JBoss Lead Developer working on Hibernate Annotations and Entity Manager - Max Ross: Hibernate Shards Project Lead - Bill Venners: Author of "Inside the Java Virtual Machine" - Michael Van Riper: Java Champion and Leader of Silicon Valley Web JUG - ... and more to be announced Although this is a free event, we must limit attendance to the first 100 JUG members that register here: http://sv-web-jug-qcon.eventbrite.com If you are interested in attending QCon SF 2008, you can save $100 off the registration price by using the following promotion code: javagroup_100off. This is a discount of $300 off list price if you register before November 14, 2008. We look forward to seeing you at QCon's inaugural Java Community Event in San Francisco. There is more information about the speakers and QCon here: http://www.qconsf.com/ That's All Folks, Van -- | Michael "Van" Riper | http://weblogs.java.net/blog/van_riper/ | http://www.linkedin.com/in/vanriper | Silicon Valley Web JUG | mailto:[EMAIL PROTECTED] | https://sv-web-jug.dev.java.net | Silicon Valley Google Technology User Group | mailto:[EMAIL PROTECTED] | http://sv-gtug.org --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: What happened to the "consumer JRE" ?
JavaSE 6 update 10 is the Consumer JRE On Nov 11, 2008, at 6:48 PM, Michael Neale wrote: > > Wasn't it supposed to provide a "flash like" plug in installation > experience? Or is it not ready yet (and its not update 10? ). > > Cause the flash like experience seems to be worlds away from the MSN > toolbar experience for users (for most users, who are windows, on most > browsers, which is IE, Java will mean installing MSN toolbar). > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: UI design ideas ..
You mean this: http://en.wikipedia.org/wiki/Ribbon_(computing) ? See also: https://substance-flamingo.dev.java.net/see.html Peter On Wed, Nov 12, 2008 at 2:50 PM, ranjith <[EMAIL PROTECTED]> wrote: > > What would be the ideas to design a UI where the toolbar has to change > based on the perspective? The perspective, however, determines the > workflow that the application offers. So, the perspectives also should > get appropriate representation. > Currently I am thinking of something like below. > Suppose the perspectives are as "Edit", "Group" and "Print" > > Toolbar with edit perspective selected > > [[EDIT]] [GROUP] [PRINT] > > Toolbar with group perspective selected > > [EDIT] [[GROUP]] [PRINT] > > Toolbar with print perspective selected > > [EDIT] [GROUP] [[PRINT]] > > EDIT, GROUP and PRINT are tabs and rest is toolbar buttons > This way, the workflow is in focus. But this looks a bit primitive, > does anyone have some 'cool' ideas? > > > > > -- What happened to Schroedinger's cat? My invisible saddled white dragon ate it. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] UI design ideas ..
What would be the ideas to design a UI where the toolbar has to change based on the perspective? The perspective, however, determines the workflow that the application offers. So, the perspectives also should get appropriate representation. Currently I am thinking of something like below. Suppose the perspectives are as "Edit", "Group" and "Print" Toolbar with edit perspective selected [[EDIT]] [GROUP] [PRINT] Toolbar with group perspective selected [EDIT] [[GROUP]] [PRINT] Toolbar with print perspective selected [EDIT] [GROUP] [[PRINT]] EDIT, GROUP and PRINT are tabs and rest is toolbar buttons This way, the workflow is in focus. But this looks a bit primitive, does anyone have some 'cool' ideas? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Java clarification required, Pointers vs References
A reference *points* to a place on the heap. If, how and when they are ever moved depends on the garbage collector. To avoid fragmentation, sweeps are made and objects can be moved to different generations and the references are then updated. Only sure thing to never be moved, are references to PermGen. The garbage collector will either "stop the world" while it does its thing or use advanced concurrent algorithms to perform its duty. From your point of view and for all practical purposes, you won't ever notice a thing. /Casper On Nov 12, 4:46 am, Kram <[EMAIL PROTECTED]> wrote: > Ok no problem, so what about the other thing I said, am I on the right > track? > > On Nov 12, 1:11 pm, Weiqi Gao <[EMAIL PROTECTED]> wrote: > > > Kram wrote: > > > Ok, so in C a pointer just points to a memory location, if whatever is > > > at that locations moves you get into trouble. But with Java, a > > > reference points to an object which has its own memory address that > > > may change and the reference wont be affected? > > > > Also, Weiqi Gao says that Java has no pointers (unless I miss > > > understood you), but Casper says "Yes, Java has pointers", which is > > > it??? > > > When Casper said "Java has pointers. But ..." what he's saying is that > > "Nah, they aren't really pointers." > > > So, no. > > > -- > > Weiqi Gao > > [EMAIL PROTECTED]://www.weiqigao.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Java clarification required, Pointers vs References
Yeah thats sort of what I meant to say, the references in Java are safe, but C style pointers are less reliable but have more functionality, is this also safe to say? On Nov 12, 3:13 pm, Casper Bang <[EMAIL PROTECTED]> wrote: > A reference *points* to a place on the heap. If, how and when they are > ever moved depends on the garbage collector. To avoid fragmentation, > sweeps are made and objects can be moved to different generations and > the references are then updated. Only sure thing to never be moved, > are references to PermGen. The garbage collector will either "stop the > world" while it does its thing or use advanced concurrent algorithms > to perform its duty. From your point of view and for all practical > purposes, you won't ever notice a thing. > > /Casper > > On Nov 12, 4:46 am, Kram <[EMAIL PROTECTED]> wrote: > > > Ok no problem, so what about the other thing I said, am I on the right > > track? > > > On Nov 12, 1:11 pm, Weiqi Gao <[EMAIL PROTECTED]> wrote: > > > > Kram wrote: > > > > Ok, so in C a pointer just points to a memory location, if whatever is > > > > at that locations moves you get into trouble. But with Java, a > > > > reference points to an object which has its own memory address that > > > > may change and the reference wont be affected? > > > > > Also, Weiqi Gao says that Java has no pointers (unless I miss > > > > understood you), but Casper says "Yes, Java has pointers", which is > > > > it??? > > > > When Casper said "Java has pointers. But ..." what he's saying is that > > > "Nah, they aren't really pointers." > > > > So, no. > > > > -- > > > Weiqi Gao > > > [EMAIL PROTECTED]://www.weiqigao.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Java clarification required, Pointers vs References
Ok no problem, so what about the other thing I said, am I on the right track? On Nov 12, 1:11 pm, Weiqi Gao <[EMAIL PROTECTED]> wrote: > Kram wrote: > > Ok, so in C a pointer just points to a memory location, if whatever is > > at that locations moves you get into trouble. But with Java, a > > reference points to an object which has its own memory address that > > may change and the reference wont be affected? > > > Also, Weiqi Gao says that Java has no pointers (unless I miss > > understood you), but Casper says "Yes, Java has pointers", which is > > it??? > > When Casper said "Java has pointers. But ..." what he's saying is that > "Nah, they aren't really pointers." > > So, no. > > -- > Weiqi Gao > [EMAIL PROTECTED]://www.weiqigao.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: What happened to the "consumer JRE" ?
Was prompted by this: http://www.webmonkey.com/blog/What_Language_Do_You_Game_In_ On Nov 12, 1:48 pm, Michael Neale <[EMAIL PROTECTED]> wrote: > Wasn't it supposed to provide a "flash like" plug in installation > experience? Or is it not ready yet (and its not update 10? ). > > Cause the flash like experience seems to be worlds away from the MSN > toolbar experience for users (for most users, who are windows, on most > browsers, which is IE, Java will mean installing MSN toolbar). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] What happened to the "consumer JRE" ?
Wasn't it supposed to provide a "flash like" plug in installation experience? Or is it not ready yet (and its not update 10? ). Cause the flash like experience seems to be worlds away from the MSN toolbar experience for users (for most users, who are windows, on most browsers, which is IE, Java will mean installing MSN toolbar). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Java clarification required, Pointers vs References
Kram wrote: > Ok, so in C a pointer just points to a memory location, if whatever is > at that locations moves you get into trouble. But with Java, a > reference points to an object which has its own memory address that > may change and the reference wont be affected? > > Also, Weiqi Gao says that Java has no pointers (unless I miss > understood you), but Casper says "Yes, Java has pointers", which is > it??? When Casper said "Java has pointers. But ..." what he's saying is that "Nah, they aren't really pointers." So, no. -- Weiqi Gao [EMAIL PROTECTED] http://www.weiqigao.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Sun to Distribute MSN Toolbar with Java
yeah - hence my desire for the distro to come from somewhere else eventually. But for consumers, its still not good enough. Its a real shame to see all the consumer JRE hard work done now going to waste. On Nov 11, 8:24 pm, Joe Data <[EMAIL PROTECTED]> wrote: > On Nov 11, 2:23 am, Joshua Marinacci <[EMAIL PROTECTED]> wrote: > > > The addons to not increase the download size unless you choose the > > extra install. With the kernel the minimum install is greatly reduced > > from the previous JRE installs. > > > - Josh, on the go > > The problem is that it is opt-out - downloading the MSN toolbar is > checked by default, so if you just click through the process, you got > yourself a new toolbar. As the Inquirer points out, that probably got > Sun more money, although Eric "We'll put Java on the iPhone" Klein > from Sun claimed otherwise first (http://www.theregister.co.uk/ > 2008/11/10/sun_stows_ms_search_on_java). > > In my mind, Sun has a bad history of bundling its own products > (Netbeans, OpenOffice, Glassfish) with the JDK to increase market > share for said items. > > Karsten --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Java clarification required, Pointers vs References
Ok, so in C a pointer just points to a memory location, if whatever is at that locations moves you get into trouble. But with Java, a reference points to an object which has its own memory address that may change and the reference wont be affected? Also, Weiqi Gao says that Java has no pointers (unless I miss understood you), but Casper says "Yes, Java has pointers", which is it??? On Nov 12, 10:49 am, Casper Bang <[EMAIL PROTECTED]> wrote: > That didn't come out right. lol Java always passes a copy of the > pointer/reference, but does so by value. So if you cross a stack frame > boundary (say call into a method) there will now be two distinct > references to the thing. That's why a swap won't work, you may swap > your second reference but that has no effect on the first once you get > back from the call and pop the old stack frame. Hmm tricky to explain. > > /Casper > > On Nov 12, 12:37 am, Casper Bang <[EMAIL PROTECTED]> wrote: > > > Yes, Java has pointers. But it has no support for pointer arithmetics > > and you cannot implement a swap method. Java always passes a copy > > (reference) to a pointer. > > > /Casper > > > On Nov 12, 12:15 am, Kram <[EMAIL PROTECTED]> wrote: > > > > Does Java have pointers? I have been trying to get a definitive answer > > > using Google and half the sites say that Java has Pointers the other > > > half say no. > > > > I have found on the Sun website that Java does not have Pointers. > > > Which really answers my question, but if references can be thought of > > > in similar fasion, what is the difference between the two. > > > > I would like it very much if someone could clearly identify for me the > > > difference between Pointers and References. > > > > And the million dollar question: Why, if Java does not have pointers, > > > can you get a NullPointerException? > > > > Thanks for the help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Java clarification required, Pointers vs References
That didn't come out right. lol Java always passes a copy of the pointer/reference, but does so by value. So if you cross a stack frame boundary (say call into a method) there will now be two distinct references to the thing. That's why a swap won't work, you may swap your second reference but that has no effect on the first once you get back from the call and pop the old stack frame. Hmm tricky to explain. /Casper On Nov 12, 12:37 am, Casper Bang <[EMAIL PROTECTED]> wrote: > Yes, Java has pointers. But it has no support for pointer arithmetics > and you cannot implement a swap method. Java always passes a copy > (reference) to a pointer. > > /Casper > > On Nov 12, 12:15 am, Kram <[EMAIL PROTECTED]> wrote: > > > Does Java have pointers? I have been trying to get a definitive answer > > using Google and half the sites say that Java has Pointers the other > > half say no. > > > I have found on the Sun website that Java does not have Pointers. > > Which really answers my question, but if references can be thought of > > in similar fasion, what is the difference between the two. > > > I would like it very much if someone could clearly identify for me the > > difference between Pointers and References. > > > And the million dollar question: Why, if Java does not have pointers, > > can you get a NullPointerException? > > > Thanks for the help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Java clarification required, Pointers vs References
Yes, Java has pointers. But it has no support for pointer arithmetics and you cannot implement a swap method. Java always passes a copy (reference) to a pointer. /Casper On Nov 12, 12:15 am, Kram <[EMAIL PROTECTED]> wrote: > Does Java have pointers? I have been trying to get a definitive answer > using Google and half the sites say that Java has Pointers the other > half say no. > > I have found on the Sun website that Java does not have Pointers. > Which really answers my question, but if references can be thought of > in similar fasion, what is the difference between the two. > > I would like it very much if someone could clearly identify for me the > difference between Pointers and References. > > And the million dollar question: Why, if Java does not have pointers, > can you get a NullPointerException? > > Thanks for the help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Java clarification required, Pointers vs References
Kram wrote: > Does Java have pointers? I have been trying to get a definitive answer > using Google and half the sites say that Java has Pointers the other > half say no. Half of them are wrong. Don't listen to them. :) > I have found on the Sun website that Java does not have Pointers. > Which really answers my question, but if references can be thought of > in similar fashion, what is the difference between the two. Between which two? If it's between Java references and Java pointers, the answer is one exists and the other doesn't. If its between Java references and pointers in some other language, say pointers in C, the answer is that C pointers points to regions in virtual memory, Java references points to something more abstract--a Java object. And you can do a number of things to C pointers that you can't do to Java references, like "advancing to pointer" by pointer arithmetic: p+=1; > I would like it very much if someone could clearly identify for me the > difference between Pointers and References. > > And the million dollar question: Why, if Java does not have pointers, > can you get a NullPointerException? They temporarily forgot that Java doesn't have pointers when they named that exception. -- Weiqi Gao [EMAIL PROTECTED] http://www.weiqigao.com/blog/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Java clarification required, Pointers vs References
Does Java have pointers? I have been trying to get a definitive answer using Google and half the sites say that Java has Pointers the other half say no. I have found on the Sun website that Java does not have Pointers. Which really answers my question, but if references can be thought of in similar fasion, what is the difference between the two. I would like it very much if someone could clearly identify for me the difference between Pointers and References. And the million dollar question: Why, if Java does not have pointers, can you get a NullPointerException? Thanks for the help. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Fwd: [The Java Posse] Re: episode 215: reflection and generics
actually my point was that you can only get the generic type information in the cases where it is there in compile time but, for instance, imagine that you had this: public class GenericTest { private List list = new ArrayList(); } even if you create an instance of GenericTest with String, the generic type of the list field would be ParameterizedType and theres absolutely no way to get the String parameter you passed in the constructor - thats because in java, generics are implemented with erasure instead of reified types, in which case you could fetch the type information On 11/11/08, Tasos Zervos <[EMAIL PROTECTED]> wrote: > > Can you please give an example with some bits of code? > I'm not sure what scenario you are trying to solve (or implying you > can't solve). > What are you going to use a Map instance field for? > (Would this be a "Generics" way of initialise a field?) > > > On Nov 10, 10:27 pm, "Marcelo Fukushima" <[EMAIL PROTECTED]> wrote: > > just a quick observation: it only works because the maps you're trying > > to extract the generic info from, contains such information in the > > containing class file (the GenericTest fields specifically) - try > > changing the field types to Map and you wont the get info > > anymore, even tough you created the maps with the type information > > > > -- Forwarded message -- > > > From: Tasos Zervos <[EMAIL PROTECTED]> > > Date: Mon, Nov 10, 2008 at 10:48 AM > > Subject: [The Java Posse] Re: episode 215: reflection and generics > > To: The Java Posse > > > > If you aren't keen to follow the article try this: > > > > import java.lang.reflect.*; > > import java.util.*; > > > > public class GenericTest > > { > >public HashMap map1 = new HashMap(); > >public HashMap map2 = new HashMap(); > > > >public static String fieldSignature(Object obj, String fieldName) > >throws SecurityException, > > NoSuchFieldException > >{ > >StringBuffer signature = new StringBuffer(fieldName); > >Field field = GenericTest.class.getField(fieldName); > >Type genericFieldType = field.getGenericType(); > >if(genericFieldType instanceof ParameterizedType) > >{ > >signature.append(" is of type > > ").append(obj.getClass().getName()).append("<"); > >ParameterizedType aType = (ParameterizedType) > > genericFieldType; > >Type[] fieldArgTypes = aType.getActualTypeArguments(); > >for(Type fieldArgType : fieldArgTypes) > >{ > >Class fieldArgClass = (Class) fieldArgType; > >signature.append(fieldArgClass.getName()).append(","); > >} > >signature.append(">"); > >} > >return signature.toString(); > >} > > > >public static void main(String[] args) throws SecurityException, > > NoSuchFieldException > >{ > >GenericTest test = new GenericTest(); > >System.out.println("map1.getClass() == map2.getClass() is " > >+ (test.map1.getClass() == test.map2.getClass()) ); > >System.out.println("map1.getClass() is " + > > test.map1.getClass()); > >System.out.println("map2.getClass() is " + > > test.map2.getClass()); > >System.out.println(GenericTest.fieldSignature(test.map1, > > "map1")); > >System.out.println(GenericTest.fieldSignature(test.map2, > > "map2")); > >} > > } > > > > My quick test shows: > > map1.getClass() == map2.getClass() is true > > map1.getClass() is class java.util.HashMap > > map2.getClass() is class java.util.HashMap > > map1 is of type java.util.HashMap > > map2 is of type java.util.HashMap > > > > :-D > > > > Tasos > > > > On Nov 10, 12:46 pm, Tasos Zervos <[EMAIL PROTECTED]> wrote: > > > The equality test has to return true otherwise you would be breaking > > > compatibility with older code. > > > This doesn't mean that there aren't other ways to find the "signature" > > > of map1 and map2. > > > > > The Reflection API does provide access to the "specific" types of > > > generic signatures. > > > > > Have a look at this 2005 > article:http://www-128.ibm.com/developerworks/java/library/j-cwt11085.html#h2 > > > > > The article series uses ASM (DRY) also later on. > > > > > On Nov 4, 11:05 pm, Christian Catchpole <[EMAIL PROTECTED]> > > > wrote: > > > > > > Here is my analysis of the situation. I could be wrong. But here > > > > goes.. > > > > > > When I got my copy of Java 5 my first question was, do generics really > > > > take the cast out of the equation? I disassembled the code to find > > > > the cast still exists. This implies that when you compile this.. > > > > > > HashMap map = new HashMap() > > > > String string = map.get(""); > > > > > > The generated code actually equates to this.. > > > > > > HashMap map = new HashMap() > > > > String string = (Strin
[The Java Posse] Re: Tor: Awesome. (Python4nb)
On Oct 29, 8:47 pm, Reinier Zwitserloot <[EMAIL PROTECTED]> wrote: > Switched to the nightly so I have something to play with on the > loong flight to San Fransisco. All the whitespace issues are > cleared up, and there's a lot more error reporting and smart insertion > to boot. No showstopper bugs as yet. Now is a good time to grab a nightly kit - I've spent the last week stabilizing things. Let me know of any bugs you found. After we release EA I'll work on destabilizing things again ;-) Here's a blog entry on the new import facility: http://blogs.sun.com/tor/entry/netbeans_screenshot_of_the_week -- Tor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Fwd: [The Java Posse] Re: episode 215: reflection and generics
Can you please give an example with some bits of code? I'm not sure what scenario you are trying to solve (or implying you can't solve). What are you going to use a Map instance field for? (Would this be a "Generics" way of initialise a field?) On Nov 10, 10:27 pm, "Marcelo Fukushima" <[EMAIL PROTECTED]> wrote: > just a quick observation: it only works because the maps you're trying > to extract the generic info from, contains such information in the > containing class file (the GenericTest fields specifically) - try > changing the field types to Map and you wont the get info > anymore, even tough you created the maps with the type information > > -- Forwarded message -- > From: Tasos Zervos <[EMAIL PROTECTED]> > Date: Mon, Nov 10, 2008 at 10:48 AM > Subject: [The Java Posse] Re: episode 215: reflection and generics > To: The Java Posse > > If you aren't keen to follow the article try this: > > import java.lang.reflect.*; > import java.util.*; > > public class GenericTest > { > public HashMap map1 = new HashMap(); > public HashMap map2 = new HashMap(); > > public static String fieldSignature(Object obj, String fieldName) > throws SecurityException, > NoSuchFieldException > { > StringBuffer signature = new StringBuffer(fieldName); > Field field = GenericTest.class.getField(fieldName); > Type genericFieldType = field.getGenericType(); > if(genericFieldType instanceof ParameterizedType) > { > signature.append(" is of type > ").append(obj.getClass().getName()).append("<"); > ParameterizedType aType = (ParameterizedType) > genericFieldType; > Type[] fieldArgTypes = aType.getActualTypeArguments(); > for(Type fieldArgType : fieldArgTypes) > { > Class fieldArgClass = (Class) fieldArgType; > signature.append(fieldArgClass.getName()).append(","); > } > signature.append(">"); > } > return signature.toString(); > } > > public static void main(String[] args) throws SecurityException, > NoSuchFieldException > { > GenericTest test = new GenericTest(); > System.out.println("map1.getClass() == map2.getClass() is " > + (test.map1.getClass() == test.map2.getClass()) ); > System.out.println("map1.getClass() is " + > test.map1.getClass()); > System.out.println("map2.getClass() is " + > test.map2.getClass()); > System.out.println(GenericTest.fieldSignature(test.map1, > "map1")); > System.out.println(GenericTest.fieldSignature(test.map2, > "map2")); > } > } > > My quick test shows: > map1.getClass() == map2.getClass() is true > map1.getClass() is class java.util.HashMap > map2.getClass() is class java.util.HashMap > map1 is of type java.util.HashMap > map2 is of type java.util.HashMap > > :-D > > Tasos > > On Nov 10, 12:46 pm, Tasos Zervos <[EMAIL PROTECTED]> wrote: > > The equality test has to return true otherwise you would be breaking > > compatibility with older code. > > This doesn't mean that there aren't other ways to find the "signature" > > of map1 and map2. > > > The Reflection API does provide access to the "specific" types of > > generic signatures. > > > Have a look at this 2005 > > article:http://www-128.ibm.com/developerworks/java/library/j-cwt11085.html#h2 > > > The article series uses ASM (DRY) also later on. > > > On Nov 4, 11:05 pm, Christian Catchpole <[EMAIL PROTECTED]> > > wrote: > > > > Here is my analysis of the situation. I could be wrong. But here > > > goes.. > > > > When I got my copy of Java 5 my first question was, do generics really > > > take the cast out of the equation? I disassembled the code to find > > > the cast still exists. This implies that when you compile this.. > > > > HashMap map = new HashMap() > > > String string = map.get(""); > > > > The generated code actually equates to this.. > > > > HashMap map = new HashMap() > > > String string = (String)map.get(""); > > > > The class returned by map.getClass() does not know the map only > > > contains Strings. It's actually the reference to the map which > > > marshals the types. > > > > I did a quick test... > > > > HashMap map1 = new HashMap(); > > > HashMap map2 = new HashMap(); > > > > System.out.println(map1.getClass() == map2.getClass()); > > > > true > > > > They use the same class and can't therefore hold the type information > > > for both declarations. > > > > I can only assume this re-compiler the posse were talking about, scans > > > the code for the actual cast / type check to determine the types. > > -- > []'s > Marcelo Takeshi Fukushima --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this g
[The Java Posse] SpringSource acquires G2One (Groovy / Grails)
>From http://www.springsource.com/g2one "On November 11, 2008, SpringSource announced that it acquired G2One Inc., the company behind the popular Groovy and Grails technologies. With the acquisition of G2One, SpringSource will now offer global enterprise support offerings for developers and IT operations that utilize Groovy and Grails applications." -- Alexander Snaps <[EMAIL PROTECTED]> http://www.jroller.com/page/greenhorn http://www.linkedin.com/in/alexandersnaps --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Hot news! JavaFX Desktop ship date Dec 2!
Dear passengers, the left wing is NOT on fire. On Tue, Nov 11, 2008 at 2:26 AM, Joshua Marinacci <[EMAIL PROTECTED]> wrote: > > I can neither confirm nor deny the awesome rumor that the JavaFX SDK > will soon be released. :) > > - Josh, on the go > > On Nov 9, 2008, at 8:08 PM, Kram <[EMAIL PROTECTED]> wrote: > > > > > This is very very cool, Im excited! > > > > I have only just started on JavaFX and am starting to blog on it: > > http://markmacumber.blogspot.com/ > > > > Hopefully the 1.0 SDK will have heaps of new features, demos, etc... > > for us all to work with. > > > > On Nov 9, 2:26 am, Weiqi Gao <[EMAIL PROTECTED]> wrote: > >> On Nov 8, 3:50 am, Patrick Wright <[EMAIL PROTECTED]> wrote: > >> > >>> Just heard this on the "This Ain't Your Dad's Java" podcast from > >>> November 7 (seehttp://blogs.sun.com/javafx/entry/ > >>> this_ain_t_your_dad), > >>> they've announced that the release data for JavaFX Desktop is set > >>> for > >>> December 2, 2008. They apparently announced this at a presentation > >>> in > >>> Korea and the news wasn't passed along. > >> > >>> Pretty cool! > >> > >>> Patrick > >> > >> Thanks, Patrick. > >> > >> I did a little transcript of the relevant segment here: > >> > >> http://www.weiqigao.com/blog/2008/11/08/javafx_december_2.html > >> > >> -- > >> Weiqi Gao > >> [EMAIL PROTECTED]://www.weiqigao.com/blog/ > > > > > > > -- Viktor Klang Senior Systems Analyst --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: Sun to Distribute MSN Toolbar with Java
On Nov 11, 2:23 am, Joshua Marinacci <[EMAIL PROTECTED]> wrote: > The addons to not increase the download size unless you choose the > extra install. With the kernel the minimum install is greatly reduced > from the previous JRE installs. > > - Josh, on the go The problem is that it is opt-out - downloading the MSN toolbar is checked by default, so if you just click through the process, you got yourself a new toolbar. As the Inquirer points out, that probably got Sun more money, although Eric "We'll put Java on the iPhone" Klein from Sun claimed otherwise first (http://www.theregister.co.uk/ 2008/11/10/sun_stows_ms_search_on_java). In my mind, Sun has a bad history of bundling its own products (Netbeans, OpenOffice, Glassfish) with the JDK to increase market share for said items. Karsten --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---
[The Java Posse] Re: #216 - Interface Inference
There was no date on the article but it looked like it was from the 1990s. Given the way that Sun has been churning through its Java developers recently, the number of people left from that era could probably be counted on one hand. (While I'm writing this, I see that the Google Ads on the right of the screen are all in (what I assume is) Arabic. I wonder what will have triggered that? Not my name, that's for sure.) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to javaposse@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/javaposse?hl=en -~--~~~~--~~--~--~---