MCPcopy Create free account
hub / github.com/ReadyTalk/avian / parseAnnotationValue

Method parseAnnotationValue

classpath/avian/Classes.java:71–141  ·  view source on GitHub ↗
(ClassLoader loader,
                                             Object pool,
                                             InputStream in)

Source from the content-addressed store, hash-verified

69 }
70
71 private static Object parseAnnotationValue(ClassLoader loader,
72 Object pool,
73 InputStream in)
74 throws IOException
75 {
76 switch (read1(in)) {
77 case 'Z':
78 return Boolean.valueOf(Singleton.getInt(pool, read2(in) - 1) != 0);
79
80 case 'B':
81 return Byte.valueOf((byte) Singleton.getInt(pool, read2(in) - 1));
82
83 case 'C':
84 return Character.valueOf((char) Singleton.getInt(pool, read2(in) - 1));
85
86 case 'S':
87 return Short.valueOf((short) Singleton.getInt(pool, read2(in) - 1));
88
89 case 'I':
90 return Integer.valueOf(Singleton.getInt(pool, read2(in) - 1));
91
92 case 'F':
93 return Float.valueOf
94 (Float.intBitsToFloat(Singleton.getInt(pool, read2(in) - 1)));
95
96 case 'J': {
97 return Long.valueOf(Singleton.getLong(pool, read2(in) - 1));
98 }
99
100 case 'D': {
101 return Double.valueOf
102 (Double.longBitsToDouble(Singleton.getLong(pool, read2(in) - 1)));
103 }
104
105 case 's': {
106 byte[] data = (byte[]) Singleton.getObject(pool, read2(in) - 1);
107
108 return new String(data, 0, data.length - 1);
109 }
110
111 case 'e': {
112 byte[] typeName = (byte[]) Singleton.getObject(pool, read2(in) - 1);
113 byte[] name = (byte[]) Singleton.getObject(pool, read2(in) - 1);
114
115 return Enum.valueOf
116 (SystemClassLoader.getClass
117 (loadVMClass(loader, typeName, 1, typeName.length - 3)),
118 new String(name, 0, name.length - 1));
119 }
120
121 case 'c':{
122 byte[] name = (byte[]) Singleton.getObject(pool, read2(in) - 1);
123
124 return SystemClassLoader.getClass
125 (loadVMClass(loader, name, 1, name.length - 3));
126 }
127
128 case '@':

Callers 2

parseAnnotationMethod · 0.95

Calls 15

valueOfMethod · 0.95
getIntMethod · 0.95
valueOfMethod · 0.95
valueOfMethod · 0.95
valueOfMethod · 0.95
valueOfMethod · 0.95
valueOfMethod · 0.95
intBitsToFloatMethod · 0.95
valueOfMethod · 0.95
getLongMethod · 0.95
valueOfMethod · 0.95
longBitsToDoubleMethod · 0.95

Tested by

no test coverage detected