Example usage for com.google.gwt.core.ext.typeinfo JMethod getJsniSignature

List of usage examples for com.google.gwt.core.ext.typeinfo JMethod getJsniSignature

Introduction

In this page you can find the example usage for com.google.gwt.core.ext.typeinfo JMethod getJsniSignature.

Prototype

String getJsniSignature();

Source Link

Document

Returns a string contating a JSNI reference to the method.

Usage

From source file:de.knightsoftnet.validators.rebind.GwtSpecificValidatorCreator.java

License:Apache License

private void writeGetterWrapperMethod(final SourceWriter sw, final JMethod method) {
    this.writeUnsafeNativeLongIfNeeded(sw, method.getReturnType());

    // private native fieldType _getter(Bean object) /*={
    sw.print("private native ");// w  ww  .  ja  va2 s  .  c  o m
    sw.print(method.getReturnType().getQualifiedSourceName());
    sw.print(" ");
    sw.print(this.toWrapperName(method));
    sw.print("(");
    sw.print(this.beanType.getName());
    sw.println(" object) /*-{");
    sw.indent();

    // return object.@com.examples.Bean::myMethod()();
    sw.print("return object.");
    sw.print(method.getJsniSignature());
    sw.println("();");

    // }-*/;
    sw.outdent();
    sw.println("}-*/;");
}