private DbOOAdt toAdt(String signature, ObjectType ot) throws DbException { DbOOAdt adt = types.get(signature); if (adt == null) { int idx = signature.lastIndexOf('.'); String packageName = (idx == -1) ? "" : signature.substring(0, idx); String classname = (idx == -1) ? signature : signature.substring(idx + 1); DbJVPackage pack = findPackageByName(packageName); adt = findClassByName(pack, classname); } return adt; } // end toAdt()
private DbJVPackage findPackageByName(String qualifiedPackageName) throws DbException { DbJVPackage pack = packages.get(qualifiedPackageName); if (pack == null) { DbOOAbsPackage parent = m_classModel; StringTokenizer st = new StringTokenizer(qualifiedPackageName, "."); while (st.hasMoreElements()) { String token = st.nextToken(); pack = findPackageByName(parent, token); if (pack == null) { pack = new DbJVPackage(parent); pack.setName(token); } // end if parent = pack; } // end while packages.put(qualifiedPackageName, pack); } // end if return pack; }
private DbOOAdt toBasicAdt(BasicType basicType) throws DbException { Map<Byte, DbJVPrimitiveType> javaTypes = getJavaTypes(); DbJVPrimitiveType type = javaTypes.get(basicType.getType()); return type; }