Mercurial > hg > graal-jvmci-8
comparison agent/src/share/classes/sun/jvm/hotspot/tools/soql/SOQL.java @ 3938:e6b1331a51d2
7086585: make Java field injection more flexible
Reviewed-by: jrose, twisti, kvn, coleenp
author | never |
---|---|
date | Sat, 10 Sep 2011 17:29:02 -0700 |
parents | c18cbe5936b8 |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
3937:c565834fb592 | 3938:e6b1331a51d2 |
---|---|
148 out.print("\t"); | 148 out.print("\t"); |
149 out.println(base.getName().asString().replace('/', '.')); | 149 out.println(base.getName().asString().replace('/', '.')); |
150 } | 150 } |
151 | 151 |
152 // list immediate fields only | 152 // list immediate fields only |
153 TypeArray fields = klass.getFields(); | 153 int numFields = klass.getJavaFieldsCount(); |
154 int numFields = (int) fields.getLength(); | |
155 ConstantPool cp = klass.getConstants(); | 154 ConstantPool cp = klass.getConstants(); |
156 out.println("fields"); | 155 out.println("fields"); |
157 if (numFields != 0) { | 156 if (numFields != 0) { |
158 for (int f = 0; f < numFields; f += InstanceKlass.NEXT_OFFSET) { | 157 for (int f = 0; f < numFields; f++){ |
159 int nameIndex = fields.getShortAt(f + InstanceKlass.NAME_INDEX_OFFSET); | 158 Symbol f_name = klass.getFieldName(f); |
160 int sigIndex = fields.getShortAt(f + InstanceKlass.SIGNATURE_INDEX_OFFSET); | 159 Symbol f_sig = klass.getFieldSignature(f); |
161 Symbol f_name = cp.getSymbolAt(nameIndex); | |
162 Symbol f_sig = cp.getSymbolAt(sigIndex); | |
163 StringBuffer sigBuf = new StringBuffer(); | 160 StringBuffer sigBuf = new StringBuffer(); |
164 new SignatureConverter(f_sig, sigBuf).dispatchField(); | 161 new SignatureConverter(f_sig, sigBuf).dispatchField(); |
165 out.print('\t'); | 162 out.print('\t'); |
166 out.print(sigBuf.toString().replace('/', '.')); | 163 out.print(sigBuf.toString().replace('/', '.')); |
167 out.print(' '); | 164 out.print(' '); |