mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
This commit is contained in:
parent
9be6ce9bbf
commit
da0220bb5b
|
@ -145,6 +145,13 @@ class JavascriptNativeProcessor {
|
||||||
}
|
}
|
||||||
isConstructor = true;
|
isConstructor = true;
|
||||||
} else {
|
} else {
|
||||||
|
AnnotationReader methodAnnot = method.getAnnotations().get(JSMethod.class.getName());
|
||||||
|
if (methodAnnot != null) {
|
||||||
|
AnnotationValue redefinedMethodName = methodAnnot.getValue("value");
|
||||||
|
if (redefinedMethodName != null) {
|
||||||
|
name = redefinedMethodName.getString();
|
||||||
|
}
|
||||||
|
}
|
||||||
if (method.getResultType() != ValueType.VOID && !isSupportedType(method.getResultType())) {
|
if (method.getResultType() != ValueType.VOID && !isSupportedType(method.getResultType())) {
|
||||||
throw new RuntimeException("Method " + invoke.getMethod() + " is not " +
|
throw new RuntimeException("Method " + invoke.getMethod() + " is not " +
|
||||||
"a proper native JavaScript method declaration");
|
"a proper native JavaScript method declaration");
|
||||||
|
|
Loading…
Reference in New Issue
Block a user