private CustomType getCustomType(IJstNode jstNode) { if (jstNode == null) { return null; } MetaProvider metaProvider = (MetaProvider) getMetaProvider(); IJstType ownerType = jstNode.getOwnerType(); CustomType cType = metaProvider.getCustomType(ownerType.getName()); if (cType == null) { cType = new CustomType(ownerType.getName()); metaProvider.addCustomType(ownerType.getName(), cType); } return cType; }
public boolean isSerializableForVjo(IJstType type, boolean isRoot) { boolean ret = false; if (type == null) return false; if (isRoot) { if (getJavaTypeForSerialable(type) != null) { return true; } } if (isJavaPrimitiveOrWrapper(type.getName()) || type.isEnum()) { return false; } String forName = ISerializableForVjo.class.getName(); if (type.isInterface()) { // Check extends of Interface if (type.getName().equals(forName)) { return true; } } else { if (type.getName().equals(forName)) { return true; } // Check interfaces of the class for (IJstType iType : type.getSatisfies()) { if (iType.getName().equals(forName)) { return true; } ret = isSerializableForVjo(iType, false); if (ret) return ret; } } for (IJstType eType : type.getExtends()) { ret = isSerializableForVjo(eType, false); if (ret) return ret; } return false; }
public Class<?> getJavaTypeForSerialable(IJstType type) { return s_javaSerializable.get(type.getName()); }
public boolean isSkipImportJsr(IJstType jstType) { String name = jstType.getName(); return s_excludeList.contains(name); }
public boolean isSkipExtends(IJstType jstType) { return (s_extends.contains(jstType.getName())); }
public boolean isSkipSatisfies(IJstType jstType) { return (s_satisfies.contains(jstType.getName())); }
public boolean isSkipImport(IJstType jstType) { String name = normalize(jstType.getName()); return isJavaPrimitiveOrWrapper(name) || isJavaLang(name); }