mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-15 02:44:47 +01:00
more method stubs for class Class
This commit is contained in:
parent
e71161302a
commit
4453cc1c8f
@ -1,5 +1,5 @@
|
||||
/*
|
||||
Copyright 2020 - 2021 Volker Berlin (i-net software)
|
||||
Copyright 2020 - 2022 Volker Berlin (i-net software)
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
@ -32,6 +32,7 @@ import static de.inetsoftware.jwebassembly.module.TypeManager.VOID;
|
||||
import java.lang.reflect.Field;
|
||||
import java.lang.reflect.Method;
|
||||
import java.lang.reflect.Type;
|
||||
import java.util.Map;
|
||||
|
||||
import de.inetsoftware.jwebassembly.api.annotation.Replace;
|
||||
import de.inetsoftware.jwebassembly.api.annotation.WasmTextCode;
|
||||
@ -217,6 +218,14 @@ class ReplacementForClass<T> {
|
||||
@WasmTextCode( "unreachable" ) // TODO
|
||||
public native boolean isAssignableFrom( Class<?> cls );
|
||||
|
||||
/**
|
||||
* Replacement of the Java method isInterface()
|
||||
*
|
||||
* @return {@code true} if this object represents an interface;
|
||||
*/
|
||||
@WasmTextCode( "unreachable" ) // TODO
|
||||
public native boolean isInterface();
|
||||
|
||||
/**
|
||||
* Replacement of the Java method isArray()
|
||||
* @return {@code true} if this object represents an array class;
|
||||
@ -405,4 +414,13 @@ class ReplacementForClass<T> {
|
||||
public boolean desiredAssertionStatus() {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Replacement of the Java method enumConstantDirectory()
|
||||
*
|
||||
* Returns a map from simple name to enum constant. This package-private
|
||||
* method is used internally by Enum to implement
|
||||
*/
|
||||
@WasmTextCode( "unreachable" ) // TODO
|
||||
native Map<String, T> enumConstantDirectory();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user