File tree Expand file tree Collapse file tree 8 files changed +53
-5
lines changed
src/org/graalvm/visualvm/heapviewer/java/impl
src/org/graalvm/visualvm/lib/jfluid/heap
src/org/graalvm/visualvm/lib/profiler/oql/engine/api/impl Expand file tree Collapse file tree 8 files changed +53
-5
lines changed Original file line number Diff line number Diff line change 29
29
<build-prerequisite />
30
30
<compile-dependency />
31
31
<run-dependency >
32
- <specification-version >1.2 </specification-version >
32
+ <specification-version >1.3 </specification-version >
33
33
</run-dependency >
34
34
</dependency >
35
35
<dependency >
Original file line number Diff line number Diff line change 47
47
import org .graalvm .visualvm .lib .jfluid .heap .Heap ;
48
48
import org .graalvm .visualvm .lib .jfluid .heap .Instance ;
49
49
import org .graalvm .visualvm .lib .jfluid .heap .JavaClass ;
50
+ import org .graalvm .visualvm .lib .jfluid .heap .ObjectArrayInstance ;
50
51
import org .graalvm .visualvm .lib .profiler .api .icons .Icons ;
51
52
import org .graalvm .visualvm .lib .profiler .heapwalk .ui .icons .HeapWalkerIcons ;
52
53
import org .openide .util .NbBundle ;
@@ -176,6 +177,8 @@ private static class FakeClass implements JavaClass {
176
177
@ Override public long getAllInstancesSize () { throw new UnsupportedOperationException ("Not supported." ); } // NOI18N
177
178
@ Override public boolean isArray () { throw new UnsupportedOperationException ("Not supported." ); } // NOI18N
178
179
@ Override public Instance getClassLoader () { throw new UnsupportedOperationException ("Not supported." ); } // NOI18N
180
+ @ Override public ObjectArrayInstance getSigners () { throw new UnsupportedOperationException ("Not supported." ); } // NOI18N
181
+ @ Override public Instance getProtectionDomain () { throw new UnsupportedOperationException ("Not supported." ); } // NOI18N
179
182
@ Override public List getFields () { throw new UnsupportedOperationException ("Not supported." ); } // NOI18N
180
183
@ Override public int getInstanceSize () { throw new UnsupportedOperationException ("Not supported." ); } // NOI18N
181
184
@ Override public List getInstances () { throw new UnsupportedOperationException ("Not supported." ); } // NOI18N
Original file line number Diff line number Diff line change 54
54
import org .graalvm .visualvm .lib .jfluid .heap .Heap ;
55
55
import org .graalvm .visualvm .lib .jfluid .heap .Instance ;
56
56
import org .graalvm .visualvm .lib .jfluid .heap .JavaClass ;
57
+ import org .graalvm .visualvm .lib .jfluid .heap .ObjectArrayInstance ;
57
58
import org .graalvm .visualvm .lib .profiler .api .icons .Icons ;
58
59
import org .graalvm .visualvm .lib .profiler .api .icons .LanguageIcons ;
59
60
import org .openide .util .lookup .ServiceProvider ;
@@ -450,6 +451,16 @@ public Instance getClassLoader() {
450
451
return null ;
451
452
}
452
453
454
+ @ Override
455
+ public ObjectArrayInstance getSigners () {
456
+ return null ;
457
+ }
458
+
459
+ @ Override
460
+ public Instance getProtectionDomain () {
461
+ return null ;
462
+ }
463
+
453
464
@ Override
454
465
public List getFields () {
455
466
return null ;
Original file line number Diff line number Diff line change 1
1
Manifest-Version: 1.0
2
2
OpenIDE-Module: org.graalvm.visualvm.lib.jfluid.heap
3
3
OpenIDE-Module-Localizing-Bundle: org/graalvm/visualvm/lib/jfluid/heap/Bundle.properties
4
- OpenIDE-Module-Specification-Version: 1.2
4
+ OpenIDE-Module-Specification-Version: 1.3
5
5
Original file line number Diff line number Diff line change @@ -109,6 +109,14 @@ public Instance getClassLoader() {
109
109
return getHprof ().getInstanceByID (getClassLoaderId ());
110
110
}
111
111
112
+ public ObjectArrayInstance getSigners () {
113
+ return (ObjectArrayInstance ) getHprof ().getInstanceByID (getSignersId ());
114
+ }
115
+
116
+ public Instance getProtectionDomain () {
117
+ return getHprof ().getInstanceByID (getProtectionDomainId ());
118
+ }
119
+
112
120
public Field getField (String name ) {
113
121
for (Field field : getFields ()) {
114
122
if (field .getName ().equals (name )) {
@@ -407,6 +415,14 @@ long getClassLoaderId() {
407
415
return getHprofBuffer ().getID (fileOffset + classDumpSegment .classLoaderIDOffset );
408
416
}
409
417
418
+ long getSignersId () {
419
+ return getHprofBuffer ().getID (fileOffset + classDumpSegment .signersID );
420
+ }
421
+
422
+ long getProtectionDomainId () {
423
+ return getHprofBuffer ().getID (fileOffset + classDumpSegment .protectionDomainIDOffset );
424
+ }
425
+
410
426
List <Value > getReferences () {
411
427
return getHprof ().findReferencesFor (getJavaClassId ());
412
428
}
Original file line number Diff line number Diff line change @@ -77,6 +77,24 @@ public interface JavaClass {
77
77
*/
78
78
Instance getClassLoader ();
79
79
80
+ /**
81
+ * returns {@link ObjectArrayInstance} representing the signers of this class.
82
+ * <br>
83
+ * Speed: fast
84
+ * @return the signers of this class, or null if there are no signers. In
85
+ * particular, this method returns null if this object represents
86
+ * a primitive type or void.
87
+ */
88
+ ObjectArrayInstance getSigners ();
89
+
90
+ /**
91
+ * returns {@link Instance} representing protection domain of this class.
92
+ * <br>
93
+ * Speed: fast
94
+ * @return the ProtectionDomain of this class
95
+ */
96
+ Instance getProtectionDomain ();
97
+
80
98
/**
81
99
* returns List of instance fields of this {@link JavaClass}.
82
100
* <br>
Original file line number Diff line number Diff line change @@ -35,7 +35,7 @@ questions.
35
35
<build-prerequisite />
36
36
<compile-dependency />
37
37
<run-dependency >
38
- <specification-version >1.0 </specification-version >
38
+ <specification-version >1.3 </specification-version >
39
39
</run-dependency >
40
40
</dependency >
41
41
<dependency >
Original file line number Diff line number Diff line change @@ -439,8 +439,8 @@ function JavaClassWrapper(jclass) {
439
439
}
440
440
441
441
this . loader = wrapJavaObject ( jclass . classLoader ) ;
442
- this . signers = undefined ; //TODO wrapJavaValue(jclass.getSigners());
443
- this . protectionDomain = undefined ; //TODO wrapJavaValue(jclass.getProtectionDomain());
442
+ this . signers = wrapJavaValue ( jclass . getSigners ( ) ) ;
443
+ this . protectionDomain = wrapJavaValue ( jclass . getProtectionDomain ( ) ) ;
444
444
Object . defineProperty ( this , "fields" , {
445
445
get :function ( ) { return wrapIterator ( jclass . fields . iterator ( ) , true ) ; }
446
446
} ) ;
You can’t perform that action at this time.
0 commit comments