Mercurial > hg > graal-jvmci-8
comparison graal/com.oracle.graal.hotspot/src/com/oracle/graal/hotspot/meta/HotSpotResolvedObjectTypeImpl.java @ 18373:91283d4a1218
Use the base class Executable (introduced in Java 8) to unify the handling of Method and Constructor in MetaAccessProvider
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Thu, 13 Nov 2014 14:56:04 -0800 |
parents | 6ac7e9c85be6 |
children | 0f4813e0b4a9 |
comparison
equal
deleted
inserted
replaced
18372:18b19a6f9851 | 18373:91283d4a1218 |
---|---|
831 @Override | 831 @Override |
832 public ResolvedJavaMethod[] getDeclaredConstructors() { | 832 public ResolvedJavaMethod[] getDeclaredConstructors() { |
833 Constructor<?>[] constructors = mirror().getDeclaredConstructors(); | 833 Constructor<?>[] constructors = mirror().getDeclaredConstructors(); |
834 ResolvedJavaMethod[] result = new ResolvedJavaMethod[constructors.length]; | 834 ResolvedJavaMethod[] result = new ResolvedJavaMethod[constructors.length]; |
835 for (int i = 0; i < constructors.length; i++) { | 835 for (int i = 0; i < constructors.length; i++) { |
836 result[i] = runtime().getHostProviders().getMetaAccess().lookupJavaConstructor(constructors[i]); | 836 result[i] = runtime().getHostProviders().getMetaAccess().lookupJavaMethod(constructors[i]); |
837 assert result[i].isConstructor(); | 837 assert result[i].isConstructor(); |
838 } | 838 } |
839 return result; | 839 return result; |
840 } | 840 } |
841 | 841 |