Package com.nomagic.magicdraw.properties
Class ListProperty
- java.lang.Object
-
- com.nomagic.magicdraw.properties.Property
-
- com.nomagic.magicdraw.properties.ListProperty
-
- All Implemented Interfaces:
PropertyVisitorAcceptor
,java.lang.Cloneable
- Direct Known Subclasses:
ClassPathEntriesListProperty
,ElementListProperty
@OpenApiAll public class ListProperty extends Property
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, UNDEFINED, VALUE, VALUE_ANNOTATIONS
-
-
Constructor Summary
Constructors Constructor Description ListProperty()
Creates and initializes a newListProperty
object.ListProperty(java.lang.String id, java.lang.Object[] value)
Creates and initializes a newListProperty
object from specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(PropertyVisitor v)
Accepts the given visitor.ListProperty
clone()
Clones the property.java.lang.String
getClassType()
Returns a class type of the property.java.lang.Object[]
getValue()
Returns properties value.java.lang.String
getValueStringRepresentation()
Returns value's string representation.void
setValue(java.lang.Object value)
Sets a value of the property.-
Methods inherited from class com.nomagic.magicdraw.properties.Property
_getValue, _isFrozen, _setFrozen, _setValue, addAnnotation, addPropertyChangeListener, addSource, addSources, areEqualByValue, areValuesEqual, checkFrozen, checkFrozen, createCellEditor, createTableCellRenderer, 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 Detail
-
ListProperty
public ListProperty()
Creates and initializes a newListProperty
object. ID of the property will be empty string and value - null.
-
ListProperty
public ListProperty(java.lang.String id, java.lang.Object[] value)
Creates and initializes a newListProperty
object from specified parameters.- Parameters:
id
- - id of the property.value
- - value of the property.
-
-
Method Detail
-
setValue
public void setValue(@CheckForNull java.lang.Object value)
Sets a value of the property.
-
getClassType
public java.lang.String getClassType()
Returns a class type of the property.- Specified by:
getClassType
in interfacePropertyVisitorAcceptor
- Overrides:
getClassType
in classProperty
- Returns:
- PropertyID.LIST_PROPERTY
- See Also:
PropertyID.LIST_PROPERTY
-
accept
public void accept(PropertyVisitor v) throws java.lang.Exception
Accepts the given visitor.- Specified by:
accept
in interfacePropertyVisitorAcceptor
- Overrides:
accept
in classProperty
- Parameters:
v
- the PropertyVisitor.- Throws:
java.lang.Exception
-
getValueStringRepresentation
public java.lang.String getValueStringRepresentation()
Description copied from class:Property
Returns value's string representation.- Overrides:
getValueStringRepresentation
in classProperty
- Returns:
- string "null" if property does not have value;
value. toString()
if property has value.
-
getValue
public java.lang.Object[] getValue()
Description copied from class:Property
Returns properties value.
-
clone
public ListProperty clone()
Description copied from class:Property
Clones the property. Clone is not deep, the clone will have the same instance of value. The clone will not have registered PropertyChangeListeners.
-
-