public DefaultDynClass( DynObjectManager manager, String name, String description, DynClass[] superClases) { this(manager, name, description); for (int i = 0; i < superClases.length; i++) { DynClass dynClass = superClases[i]; if (!this.classes.containsKey(dynClass.getFullName())) { this.classes.put(dynClass.getFullName(), dynClass); } } }
protected static void registerDynClass() { DynObjectManager dynman = ToolsLocator.getDynObjectManager(); DynClass dynClass; DynField field; if (DYNCLASS == null) { DynClass dbfDynClass = DBFStoreProvider.DYNCLASS; dynClass = dynman.add(DYNCLASS_NAME); field = dynClass.addDynField(DYNFIELD_SRSORIGINALPARAMETERS_NAME); field.setType(DataTypes.STRING); field.setDescription("SRS original parameters"); // The SHP store parameters extend the DBF store parameters dynClass.extend(dbfDynClass); DYNCLASS = dynClass; } }
public boolean isInstance(DynObject dynObject) { if (this.superClassesMap == null) { consolide(); } DefaultDynClass objClass = (DefaultDynClass) dynObject.getDynClass(); if (this.superClassesMap.containsKey(objClass.getFullName())) { return true; } if (this.getFullName().equals(objClass.getFullName())) { return true; } if (objClass.isAnonymous) { Iterator it = objClass.classes.values().iterator(); while (it.hasNext()) { DynClass dc = (DynClass) it.next(); if (this.superClassesMap.containsKey(dc.getFullName())) { return true; } } } return false; }