/** * Test if the object represents an identifier. * @param object The suspected object identifier. * @return True, if object identifier. */ public boolean isIdentifier(Object object) { return generator.isId(object); }
/** * Impl of root/non-root object creation. */ protected Object createObject(OAVObjectType type, boolean root) { // #ifndef MIDP assert nocheck || checkTypeDefined(type); // #endif Object ret = generator.createId(this, type); // Map content = new LinkedHashMap(); // objects.put(ret, content); Map content = internalCreateObject(ret); content.put(TYPE, type); // System.out.println("Created object of type: "+type); eventhandler.objectAdded(ret, type, root); if(root) this.rootobjects.add(ret); return ret; }
/** * Create an object. * Creates an object identifier that can be used * to store/retrieve attribute values. * May reuse old object identifiers for performance. * @return An object identifier. */ public Object createObject(OAVObjectType type) { assert nocheck || checkTypeDefined(type); OAVInternalObjectId ret = (OAVInternalObjectId)generator.createId(this, type); objects.put(ret, new LinkedHashMap()); types.put(ret, type); //System.out.println("Adding type: "+type); // Event should be thrown once the object is used somewhere in the state? eventhandler.objectAdded(ret.getPhantomExternalId(), type, false); return ret.getWeakExternalId(); }
/** * Add an external usage of a state object (oid). This prevents * the oav object of being garbage collected as long * as external references are present. * @param id The oav object id. * @param external The user object. */ public void addExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * Impl of root/non-root object creation. */ protected Object createObject(OAVObjectType type, boolean root) { // #ifndef MIDP assert nocheck || checkTypeDefined(type); // #endif Object ret = generator.createId(this, type); // Map content = new LinkedHashMap(); // objects.put(ret, content); Map content = internalCreateObject(ret); content.put(TYPE, type); // System.out.println("Created object of type: "+type); eventhandler.objectAdded(ret, type, root); if(root) this.rootobjects.add(ret); return ret; }
/** * Test if the object represents an identifier. * @param object The suspected object identifier. * @return True, if object identifier. */ public boolean isIdentifier(Object object) { return generator.isId(object); }
/** * Create an object. * Creates an object identifier that can be used * to store/retrieve attribute values. * May reuse old object identifiers for performance. * @return An object identifier. */ public Object createObject(OAVObjectType type) { assert nocheck || checkTypeDefined(type); OAVInternalObjectId ret = (OAVInternalObjectId)generator.createId(this, type); objects.put(ret, new LinkedHashMap()); types.put(ret, type); //System.out.println("Adding type: "+type); // Event should be thrown once the object is used somewhere in the state? eventhandler.objectAdded(ret.getPhantomExternalId(), type, false); return ret.getWeakExternalId(); }
/** * Test if the object represents an identifier. * @param object The suspected object identifier. * @return True, if object identifier. */ public boolean isIdentifier(Object object) { return generator.isId(object); }
/** * Test if the object represents an identifier. * @param object The suspected object identifier. * @return True, if object identifier. */ public boolean isIdentifier(Object object) { return generator.isId(object); }
/** * Remove an external usage of a state object (oid). This allows * the oav object of being garbage collected when no * further external references and no internal references * are present. * @param id The oav object id. * @param external The state external object. */ public void removeExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * Remove an external usage of a state object (oid). This allows * the oav object of being garbage collected when no * further external references and no internal references * are present. * @param id The oav object id. * @param external The state external object. */ public void removeExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * Test if reading the object (oid) is allowed. * Reading is allowed on removed objects as long as there are external references. * @param id The object (oid). * @return True, if valid. */ protected boolean checkValidStateObjectRead(Object id) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif return true; // Hack!!! Needed, because isExternallyUsed always returns false. } }
/** * Remove an external usage of a state object (oid). This allows * the oav object of being garbage collected when no * further external references and no internal references * are present. * @param id The oav object id. * @param external The state external object. */ public void removeExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * Add an external usage of a state object (oid). This prevents * the oav object of being garbage collected as long * as external references are present. * @param id The oav object id. * @param external The user object. */ public void addExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * Remove an external usage of a state object (oid). This allows * the oav object of being garbage collected when no * further external references and no internal references * are present. * @param id The oav object id. * @param external The state external object. */ public void removeExternalObjectUsage(Object id, Object external) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif }
/** * Test if reading the object (oid) is allowed. * Reading is allowed on removed objects as long as there are external references. * @param id The object (oid). * @return True, if valid. */ protected boolean checkValidStateObjectRead(Object id) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif return true; // Hack!!! Needed, because isExternallyUsed always returns false. } }
/** * Add an external usage of a state object (oid). This prevents * the oav object of being garbage collected as long * as external references are present. * @param id The oav object id. * @param external The user object. */ public void addExternalObjectUsage(Object id, Object external) { // #ifndef MIDP if(!generator.isId(id)) System.out.println("driss: "+id); assert nocheck || generator.isId(id); // #endif }
/** * Add an external usage of a state object (oid). This prevents * the oav object of being garbage collected as long * as external references are present. * @param id The oav object id. * @param external The user object. */ public void addExternalObjectUsage(Object id, Object external) { // #ifndef MIDP if(!generator.isId(id)) System.out.println("driss: "+id); assert nocheck || generator.isId(id); // #endif }
/** * Test if the object is a valid state object (oid). * @param id The object (oid). * @return True, if valid. */ protected boolean checkValidStateObject(Object id) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif return containsObject(id); }
/** * Test if the object is a valid state object (oid). * @param id The object (oid). * @return True, if valid. */ protected boolean checkValidStateObject(Object id) { // #ifndef MIDP assert nocheck || generator.isId(id); // #endif return containsObject(id); }