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