示例#1
0
  /**
   * 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
 public boolean isJavaLangObject(JType type) {
   assert type != null;
   return type.getUnderlyingType() == typeJavaLangObject;
 }
示例#3
0
 public boolean isJavaLangString(JType type) {
   assert type != null;
   return type.getUnderlyingType() == typeString;
 }