Closed
Description
I see from https://github.com/oracle/graal/blob/master/substratevm/REFLECTION.md that substratevm already supports quite a few methods on Class
. But apparently getDeclaredClasses()
is not one of them? It would be useful.
This is what happens if you try it (at runtime):
Exception in thread "main" com.oracle.svm.core.jdk.UnsupportedFeatureError: Unsupported method java.lang.Class.getDeclaredClasses0() is reachable: The declaring class of this element has been substituted, but this element is not present in the substitution class
at java.lang.Throwable.<init>(Throwable.java:265)
at java.lang.Error.<init>(Error.java:70)
at com.oracle.svm.core.jdk.UnsupportedFeatureError.<init>(UnsupportedFeatureError.java:31)
at com.oracle.svm.core.jdk.Target_com_oracle_svm_core_util_VMError.unsupportedFeature(VMErrorSubstitutions.java:109)
at java.lang.Class.getDeclaredClasses0(Class.java)
at java.lang.Class.getDeclaredClasses(Class.java:1867)
This is from an image build with JSON containing
{
"name": "java.lang.Class",
"allDeclaredConstructors": true,
"allPublicConstructors": true,
"allDeclaredMethods": true,
"allPublicMethods": true
},
(so what that does, I have no idea).