konsoletyper 2014-11-03 20:48:17 +03:00
parent 9be6ce9bbf
commit da0220bb5b

View File

@ -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");