more stub methods to compile the Java runtime

This commit is contained in:
Volker Berlin 2021-05-23 12:04:20 +02:00
parent 428794efae
commit 466714bd88

View File

@ -30,6 +30,7 @@ import static de.inetsoftware.jwebassembly.module.TypeManager.TYPE_DESCRIPTION_T
import static de.inetsoftware.jwebassembly.module.TypeManager.VOID;
import java.lang.reflect.Method;
import java.lang.reflect.Type;
import de.inetsoftware.jwebassembly.api.annotation.Replace;
import de.inetsoftware.jwebassembly.api.annotation.WasmTextCode;
@ -198,6 +199,22 @@ class ReplacementForClass<T> {
@WasmTextCode( "unreachable" ) // TODO
public native Class<? super T> getSuperclass();
/**
* Replacement of the Java methods getInterfaces()
* @return an array of interfaces implemented by this class.
*/
public Class<?>[] getInterfaces() { //TODO
return new Class<?>[0];
}
/**
* Replacement of the Java methods getGenericInterfaces()
* @return an array of interfaces implemented by this class
*/
public Type[] getGenericInterfaces() { // TODO
return getInterfaces();
}
/**
* Replacement of the native Java methods getComponentType()
*/