Top.Mail.Ru
November 21st, 2007 - Java developers — LiveJournal
? ?

Java developers

November 21st, 2007
 

10:02 am - ex_juan_gan - I wonder if...

there's a better way than declaring from time to time the following map:
  private static final Map<String, Class> primitiveToClass = new HashMap<String, Class>() {{
    put("boolean", Boolean.class);
    put("double", Double.class);
    put("float", Float.class);
    put("long", Long.class);
    put("int", Integer.class);
  }};


(Used Crazybob's contraption, but that's not the point.)
Powered by LiveJournal.com