Package com.nomagic.magicdraw.properties
Class ListProperty
java.lang.Object
com.nomagic.magicdraw.properties.Property
com.nomagic.magicdraw.properties.ListProperty
- All Implemented Interfaces:
PropertyVisitorAcceptor,Cloneable
- Direct Known Subclasses:
ClassPathEntriesListProperty,ElementListProperty
ListProperty represents a property for storing and editing entries of the list.-
Field Summary
Fields inherited from class com.nomagic.magicdraw.properties.Property
DEFAULT_PROPERTY_RESOURCE_PROVIDER, EDITABLE, NULL, NULL_ID_PROPERTY_RESOURCE_PROVIDER, TO, UNDEFINED, VALUE, VALUE_ANNOTATIONS -
Constructor Summary
ConstructorsConstructorDescriptionCreates and initializes a newListPropertyobject.ListProperty(String id, Object[] value) Creates and initializes a newListPropertyobject from specified parameters. -
Method Summary
Methods inherited from class com.nomagic.magicdraw.properties.Property
_getValue, _isFrozen, _setFrozen, _setValue, addAnnotation, addPropertyChangeListener, addSource, addSources, areEqualByValue, areValuesEqual, checkFrozen, checkFrozen, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getAnnotation, getAnnotations, getDescription, getDescriptionID, getFirstElementFromSources, getGroup, getID, getIntroductoryVersion, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSortableValueStringRepresentation, getSourceAsElement, getSources, getSourcesAsStream, getUndefinedString, getUndefinedString, hashCode, isEditable, isUndefinedState, isValueCompatible, removeAnnotation, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setAnnotations, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState, toString
-
Constructor Details
-
ListProperty
public ListProperty()Creates and initializes a newListPropertyobject. ID of the property will be empty string and value - null. -
ListProperty
Creates and initializes a newListPropertyobject from specified parameters.- Parameters:
id- - id of the property.value- - value of the property.
-
-
Method Details
-
setValue
Sets a value of the property.- Overrides:
setValuein classProperty- Parameters:
value- a value.- Throws:
IllegalArgumentException- if specified value is not an array. null is legal value.
-
getClassType
Returns a class type of the property.- Specified by:
getClassTypein interfacePropertyVisitorAcceptor- Overrides:
getClassTypein classProperty- Returns:
- PropertyID.LIST_PROPERTY
- See Also:
-
accept
Accepts the given visitor.- Specified by:
acceptin interfacePropertyVisitorAcceptor- Overrides:
acceptin classProperty- Parameters:
v- the PropertyVisitor.- Throws:
Exception
-
getValueStringRepresentation
Description copied from class:PropertyReturns value's string representation.- Overrides:
getValueStringRepresentationin classProperty- Returns:
- string "null" if property does not have value;
value. toString()if property has value.
-
getValue
Description copied from class:PropertyReturns properties value. -
clone
Description copied from class:PropertyClones the property. Clone is not deep, the clone will have the same instance of value. The clone will not have registered PropertyChangeListeners.
-