コード例 #1
0
ファイル: JProgram.java プロジェクト: imatellan/gwt
  /**
   * If the type is a JSO or an array of JSOs it returns cggcc.JavaScriptObject or an array of
   * cggcc.JavaScriptObject respectively; otherwise returns {@code type}.
   */
  public JType normalizeJsoType(JType type) {
    type = type.getUnderlyingType();

    if (type instanceof JArrayType) {
      return getOrCreateArrayType(
          normalizeJsoType(((JArrayType) type).getLeafType()), ((JArrayType) type).getDims());
    }

    if (type.isJsoType()) {
      return getJavaScriptObject();
    }
    return type;
  }
コード例 #2
0
ファイル: JProgram.java プロジェクト: imatellan/gwt
 public boolean isJavaLangObject(JType type) {
   assert type != null;
   return type.getUnderlyingType() == typeJavaLangObject;
 }
コード例 #3
0
ファイル: JProgram.java プロジェクト: imatellan/gwt
 public boolean isJavaLangString(JType type) {
   assert type != null;
   return type.getUnderlyingType() == typeString;
 }