1 package org.apache.commons.ognl;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import java.util.IdentityHashMap;
23 import java.util.Map;
24
25
26
27
28 class PrimitiveWrapperClasses {
29
30 private Map<Class<?>, Class<?>> map = new IdentityHashMap<Class<?>, Class<?>>();
31
32 PrimitiveWrapperClasses() {
33 map.put( Boolean.TYPE, Boolean.class );
34 map.put( Boolean.class, Boolean.TYPE );
35 map.put( Byte.TYPE, Byte.class );
36 map.put( Byte.class, Byte.TYPE );
37 map.put( Character.TYPE, Character.class );
38 map.put( Character.class, Character.TYPE );
39 map.put( Short.TYPE, Short.class );
40 map.put( Short.class, Short.TYPE );
41 map.put( Integer.TYPE, Integer.class );
42 map.put( Integer.class, Integer.TYPE );
43 map.put( Long.TYPE, Long.class );
44 map.put( Long.class, Long.TYPE );
45 map.put( Float.TYPE, Float.class );
46 map.put( Float.class, Float.TYPE );
47 map.put( Double.TYPE, Double.class );
48 map.put( Double.class, Double.TYPE );
49 }
50
51 Class<?> get( Class<?> cls ) {
52 return map.get( cls );
53 }
54 }