Mercurial > hg > graal-compiler
comparison agent/src/share/classes/sun/jvm/hotspot/jdi/InterfaceTypeImpl.java @ 14909:4ca6dc0799b6
Backout jdk9 merge
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 01 Apr 2014 13:57:07 +0200 |
parents | 29985fccf378 |
children |
comparison
equal
deleted
inserted
replaced
14908:8db6e76cb658 | 14909:4ca6dc0799b6 |
---|---|
22 * | 22 * |
23 */ | 23 */ |
24 | 24 |
25 package sun.jvm.hotspot.jdi; | 25 package sun.jvm.hotspot.jdi; |
26 | 26 |
27 import com.sun.jdi.*; | |
28 import sun.jvm.hotspot.oops.InstanceKlass; | |
29 | |
30 import java.util.List; | |
31 import java.util.ArrayList; | |
32 import java.util.Map; | |
33 import java.util.Iterator; | |
34 import java.util.Collections; | |
27 import java.lang.ref.SoftReference; | 35 import java.lang.ref.SoftReference; |
28 import java.util.ArrayList; | |
29 import java.util.Collections; | |
30 import java.util.Iterator; | |
31 import java.util.List; | |
32 import java.util.Map; | |
33 import java.util.Set; | |
34 | |
35 import sun.jvm.hotspot.oops.InstanceKlass; | |
36 | |
37 import com.sun.jdi.ClassNotPreparedException; | |
38 import com.sun.jdi.ClassType; | |
39 import com.sun.jdi.InterfaceType; | |
40 import com.sun.jdi.Method; | |
41 import com.sun.jdi.ReferenceType; | |
42 import com.sun.jdi.VirtualMachine; | |
43 | 36 |
44 public class InterfaceTypeImpl extends ReferenceTypeImpl | 37 public class InterfaceTypeImpl extends ReferenceTypeImpl |
45 implements InterfaceType { | 38 implements InterfaceType { |
46 private SoftReference superInterfacesCache = null; | 39 private SoftReference superInterfacesCache = null; |
47 private SoftReference subInterfacesCache = null; | 40 private SoftReference subInterfacesCache = null; |
101 implementorsCache = new SoftReference(implementors); | 94 implementorsCache = new SoftReference(implementors); |
102 } | 95 } |
103 return implementors; | 96 return implementors; |
104 } | 97 } |
105 | 98 |
106 @Override | 99 void addVisibleMethods(Map methodMap) { |
107 void addVisibleMethods(Map<String, Method> methodMap, Set<InterfaceType> seenInterfaces) { | |
108 /* | 100 /* |
109 * Add methods from | 101 * Add methods from |
110 * parent types first, so that the methods in this class will | 102 * parent types first, so that the methods in this class will |
111 * overwrite them in the hash table | 103 * overwrite them in the hash table |
112 */ | 104 */ |
113 Iterator<InterfaceType> iter = superinterfaces().iterator(); | 105 Iterator iter = superinterfaces().iterator(); |
114 while (iter.hasNext()) { | 106 while (iter.hasNext()) { |
115 InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next(); | 107 InterfaceTypeImpl interfaze = (InterfaceTypeImpl)iter.next(); |
116 if (!seenInterfaces.contains(interfaze)) { | 108 interfaze.addVisibleMethods(methodMap); |
117 interfaze.addVisibleMethods(methodMap, seenInterfaces); | |
118 seenInterfaces.add(interfaze); | |
119 } | |
120 } | 109 } |
121 | 110 |
122 addToMethodMap(methodMap, methods()); | 111 addToMethodMap(methodMap, methods()); |
123 } | 112 } |
124 | 113 |