package replicant.messages;

import javax.annotation.Nonnull;
import jsinterop.annotations.JsOverlay;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;

/**
 * The abstract message that messages conform to.
 */
@SuppressWarnings( "NullableProblems" )
@SuppressFBWarnings( "EI_EXPOSE_REP" )
@JsType( isNative = true, namespace = JsPackage.GLOBAL, name = "Object" )
public abstract class AbstractMessage
{
  @Nonnull
  String type;

  /**
   * Return the type of the message.
   *
   * @return the type of the message.
   */
  @Nonnull
  @JsOverlay
  public final String getType()
  {
    return type;
  }
}

package replicant.messages;

import javax.annotation.Nonnull;
import jsinterop.annotations.JsPackage;
import jsinterop.annotations.JsType;

/**
 * The abstract message that messages conform to.
 */
@SuppressWarnings( "NullableProblems" )
@SuppressFBWarnings( "EI_EXPOSE_REP" )
@JsType( isNative = true, namespace = JsPackage.GLOBAL, name = "Object" )
public abstract class AbstractMessage
{
  @Nonnull
  String type;

  /**
   * Return the type of the message.
   *
   * @return the type of the message.
   */
  @Nonnull
  public String getType()
  {
    return type;
  }
}

--- 
+++ 
@@ -1,6 +1,7 @@
 package replicant.messages;
 
 import javax.annotation.Nonnull;
+import jsinterop.annotations.JsOverlay;
 import jsinterop.annotations.JsPackage;
 import jsinterop.annotations.JsType;
 
@@ -21,7 +22,8 @@
    * @return the type of the message.
    */
   @Nonnull
-  public String getType()
+  @JsOverlay
+  public final String getType()
   {
     return type;
   }
Make sure this class complies with JsType restrictions
