/** * Set the value of a simple property with the specified name. * * @param name Name of the property whose value is to be set * @param value Value to which this property is to be set */ @Override public void set(final String name, final Object value) { if (isRestricted() && !values.containsKey(name)) { throw new IllegalArgumentException ("Invalid property name '" + name + "' (DynaClass is restricted)"); } values.put(name, value); }
/** * Set the value of a simple property with the specified name. * * @param name Name of the property whose value is to be set * @param value Value to which this property is to be set */ @Override public void set(final String name, final Object value) { if (isRestricted() && !values.containsKey(name)) { throw new IllegalArgumentException ("Invalid property name '" + name + "' (DynaClass is restricted)"); } values.put(name, value); }
/** * Remove the specified dynamic property, and any associated data type, * readability, and writeability, from this dynamic class. * <strong>NOTE</strong> - This does <strong>NOT</strong> cause any * corresponding property values to be removed from DynaBean instances * associated with this DynaClass. * * @param name Name of the dynamic property to remove * * @throws IllegalArgumentException if name is null * @throws IllegalStateException if this DynaClass is currently * restricted, so no properties can be removed */ public void remove(final String name) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No properties can be removed."); } // Remove, if property doesn't exist if (values.containsKey(name)) { values.remove(name); } }
/** * Remove the specified dynamic property, and any associated data type, * readability, and writeability, from this dynamic class. * <strong>NOTE</strong> - This does <strong>NOT</strong> cause any * corresponding property values to be removed from DynaBean instances * associated with this DynaClass. * * @param name Name of the dynamic property to remove * * @throws IllegalArgumentException if name is null * @throws IllegalStateException if this DynaClass is currently * restricted, so no properties can be removed */ public void remove(final String name) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No properties can be removed."); } // Remove, if property doesn't exist if (values.containsKey(name)) { values.remove(name); } }
/** * Add a new dynamic property with the specified data type, but with * no restrictions on readability or writeability. * * @param name Name of the new dynamic property * @param type Data type of the new dynamic property (null for no * restrictions) * * @throws IllegalArgumentException if name is null * @throws IllegalStateException if this DynaClass is currently * restricted, so no new properties can be added */ public void add(final String name, final Class<?> type) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No new properties can be added."); } final Object value = values.get(name); // Check if the property already exists if (value == null) { values.put(name, type == null ? null : createProperty(name, type)); } }
/** * Add a new dynamic property with the specified data type, but with * no restrictions on readability or writeability. * * @param name Name of the new dynamic property * @param type Data type of the new dynamic property (null for no * restrictions) * * @throws IllegalArgumentException if name is null * @throws IllegalStateException if this DynaClass is currently * restricted, so no new properties can be added */ public void add(final String name, final Class<?> type) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No new properties can be added."); } final Object value = values.get(name); // Check if the property already exists if (value == null) { values.put(name, type == null ? null : createProperty(name, type)); } }
/** * Set the value of a simple property with the specified name. * * @param name Name of the property whose value is to be set * @param value Value to which this property is to be set */ public void set(String name, Object value) { if (isRestricted() && !values.containsKey(name)) { throw new IllegalArgumentException ("Invalid property name '" + name + "' (DynaClass is restricted)"); } values.put(name, value); }
/** * Set the value of a simple property with the specified name. * * @param name Name of the property whose value is to be set * @param value Value to which this property is to be set */ public void set(String name, Object value) { if (isRestricted() && !values.containsKey(name)) { throw new IllegalArgumentException ("Invalid property name '" + name + "' (DynaClass is restricted)"); } values.put(name, value); }
/** * Set the value of a simple property with the specified name. * * @param name Name of the property whose value is to be set * @param value Value to which this property is to be set */ public void set(String name, Object value) { if (isRestricted() && !values.containsKey(name)) { throw new IllegalArgumentException ("Invalid property name '" + name + "' (DynaClass is restricted)"); } values.put(name, value); }
/** * Set the value of a simple property with the specified name. * * @param name Name of the property whose value is to be set * @param value Value to which this property is to be set */ @Override public void set(final String name, final Object value) { if (isRestricted() && !values.containsKey(name)) { throw new IllegalArgumentException ("Invalid property name '" + name + "' (DynaClass is restricted)"); } values.put(name, value); }
/** * Remove the specified dynamic property, and any associated data type, * readability, and writeability, from this dynamic class. * <strong>NOTE</strong> - This does <strong>NOT</strong> cause any * corresponding property values to be removed from DynaBean instances * associated with this DynaClass. * * @param name Name of the dynamic property to remove * * @exception IllegalArgumentException if name is null * @exception IllegalStateException if this DynaClass is currently * restricted, so no properties can be removed */ public void remove(String name) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No properties can be removed."); } // Remove, if property doesn't exist if (values.containsKey(name)) { values.remove(name); } }
/** * Remove the specified dynamic property, and any associated data type, * readability, and writeability, from this dynamic class. * <strong>NOTE</strong> - This does <strong>NOT</strong> cause any * corresponding property values to be removed from DynaBean instances * associated with this DynaClass. * * @param name Name of the dynamic property to remove * * @exception IllegalArgumentException if name is null * @exception IllegalStateException if this DynaClass is currently * restricted, so no properties can be removed */ public void remove(String name) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No properties can be removed."); } // Remove, if property doesn't exist if (values.containsKey(name)) { values.remove(name); } }
/** * Remove the specified dynamic property, and any associated data type, * readability, and writeability, from this dynamic class. * <strong>NOTE</strong> - This does <strong>NOT</strong> cause any * corresponding property values to be removed from DynaBean instances * associated with this DynaClass. * * @param name Name of the dynamic property to remove * * @throws IllegalArgumentException if name is null * @throws IllegalStateException if this DynaClass is currently * restricted, so no properties can be removed */ public void remove(final String name) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No properties can be removed."); } // Remove, if property doesn't exist if (values.containsKey(name)) { values.remove(name); } }
/** * Remove the specified dynamic property, and any associated data type, * readability, and writeability, from this dynamic class. * <strong>NOTE</strong> - This does <strong>NOT</strong> cause any * corresponding property values to be removed from DynaBean instances * associated with this DynaClass. * * @param name Name of the dynamic property to remove * * @exception IllegalArgumentException if name is null * @exception IllegalStateException if this DynaClass is currently * restricted, so no properties can be removed */ public void remove(String name) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No properties can be removed."); } // Remove, if property doesn't exist if (values.containsKey(name)) { values.remove(name); } }
/** * Add a new dynamic property with the specified data type, but with * no restrictions on readability or writeability. * * @param name Name of the new dynamic property * @param type Data type of the new dynamic property (null for no * restrictions) * * @exception IllegalArgumentException if name is null * @exception IllegalStateException if this DynaClass is currently * restricted, so no new properties can be added */ public void add(String name, Class type) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No new properties can be added."); } Object value = values.get(name); // Check if the property already exists if (value == null) { values.put(name, type == null ? null : createProperty(name, type)); } }
/** * Add a new dynamic property with the specified data type, but with * no restrictions on readability or writeability. * * @param name Name of the new dynamic property * @param type Data type of the new dynamic property (null for no * restrictions) * * @throws IllegalArgumentException if name is null * @throws IllegalStateException if this DynaClass is currently * restricted, so no new properties can be added */ public void add(final String name, final Class<?> type) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No new properties can be added."); } final Object value = values.get(name); // Check if the property already exists if (value == null) { values.put(name, type == null ? null : createProperty(name, type)); } }
/** * Add a new dynamic property with the specified data type, but with * no restrictions on readability or writeability. * * @param name Name of the new dynamic property * @param type Data type of the new dynamic property (null for no * restrictions) * * @exception IllegalArgumentException if name is null * @exception IllegalStateException if this DynaClass is currently * restricted, so no new properties can be added */ public void add(String name, Class type) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No new properties can be added."); } Object value = values.get(name); // Check if the property already exists if (value == null) { values.put(name, type == null ? null : createProperty(name, type)); } }
/** * Add a new dynamic property with the specified data type, but with * no restrictions on readability or writeability. * * @param name Name of the new dynamic property * @param type Data type of the new dynamic property (null for no * restrictions) * * @exception IllegalArgumentException if name is null * @exception IllegalStateException if this DynaClass is currently * restricted, so no new properties can be added */ public void add(String name, Class type) { if (name == null) { throw new IllegalArgumentException("Property name is missing."); } if (isRestricted()) { throw new IllegalStateException("DynaClass is currently restricted. No new properties can be added."); } Object value = values.get(name); // Check if the property already exists if (value == null) { values.put(name, type == null ? null : createProperty(name, type)); } }