Package com.nomagic.magicdraw.properties
Class ClassPathEntriesListProperty
- java.lang.Object
-
- com.nomagic.magicdraw.properties.Property
-
- com.nomagic.magicdraw.properties.ListProperty
-
- com.nomagic.magicdraw.properties.ClassPathEntriesListProperty
-
- All Implemented Interfaces:
PropertyVisitorAcceptor
,java.lang.Cloneable
@OpenApiAll public class ClassPathEntriesListProperty extends ListProperty
ClassPathEntriesListProperty
represents a property for storing and editing entries of the classpath.
-
-
Field Summary
-
Fields inherited from class com.nomagic.magicdraw.properties.Property
DEFAULT_PROPERTY_RESOURCE_PROVIDER, EDITABLE, NULL, NULL_ID_PROPERTY_RESOURCE_PROVIDER, UNDEFINED, VALUE
-
-
Constructor Summary
Constructors Constructor Description ClassPathEntriesListProperty()
Creates and initializes a newClassPathEntriesListProperty
object.ClassPathEntriesListProperty(java.lang.String id, java.lang.Object[] value, boolean allowFiles)
Creates and initializes a newClassPathEntriesListProperty
object from specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(PropertyVisitor visitor)
Accepts the given visitor.protected boolean
areValuesEqual(java.lang.Object oldValue, java.lang.Object newValue)
Check if values are equal before setting new value.ClassPathEntriesListProperty
clone()
Clones the property.java.lang.String
getClassType()
Returns a class type of the property.FileProperty[]
getFileProperties()
java.io.File[]
getFiles()
Returns an array of files.java.lang.String[]
getFilesPaths()
java.lang.String
getValueStringRepresentation()
Returns value's string representation.boolean
isAllowsFiles()
void
setAllowsFiles(boolean allow)
-
Methods inherited from class com.nomagic.magicdraw.properties.ListProperty
getValue, setValue
-
Methods inherited from class com.nomagic.magicdraw.properties.Property
_getValue, _isFrozen, _setFrozen, _setValue, addPropertyChangeListener, addSource, addSources, checkFrozen, checkFrozen, createCellEditor, createTableCellRenderer, equals, firePropertyChange, generateDefaultDescriptionID, getAdditionalProperties, getAdditionalProperty, getDescription, getDescriptionID, getFirstElementFromSources, getGroup, getID, getIntroductoryVersion, getName, getNonEditableReason, getProjectFromSourcesOrActive, getPureDescription, getResourceProvider, getResourceProviderID, getSourceAsElement, getSources, getSourcesAsStream, getUndefinedString, getUndefinedString, hashCode, isEditable, isUndefinedState, isValueCompatible, removePropertyChangeListener, setAdditionalProperties, setAdditionalProperty, setDescription, setDescriptionID, setEditable, setGroup, setID, setIntroductoryVersion, setNonEditableReason, setResourceProvider, setResourceProviderID, setSources, setUndefinedState, toString
-
-
-
-
Constructor Detail
-
ClassPathEntriesListProperty
public ClassPathEntriesListProperty()
Creates and initializes a newClassPathEntriesListProperty
object.
-
ClassPathEntriesListProperty
public ClassPathEntriesListProperty(java.lang.String id, @CheckForNull java.lang.Object[] value, boolean allowFiles)
Creates and initializes a newClassPathEntriesListProperty
object from specified parameters.- Parameters:
id
- - id of the propertyvalue
- - a value of the property
-
-
Method Detail
-
getClassType
public java.lang.String getClassType()
Returns a class type of the property.- Specified by:
getClassType
in interfacePropertyVisitorAcceptor
- Overrides:
getClassType
in classListProperty
- Returns:
- PropertyID.CLASS_PATH_LIST_PROPERTY
- See Also:
PropertyID.CLASS_PATH_LIST_PROPERTY
-
accept
public void accept(PropertyVisitor visitor) throws java.lang.Exception
Description copied from class:ListProperty
Accepts the given visitor.- Specified by:
accept
in interfacePropertyVisitorAcceptor
- Overrides:
accept
in classListProperty
- Parameters:
visitor
- the PropertyVisitor.- Throws:
java.lang.Exception
- See Also:
PropertyVisitorAcceptor.accept(com.nomagic.magicdraw.properties.PropertyVisitor)
-
getFiles
@CheckForNull public java.io.File[] getFiles()
Returns an array of files.- Returns:
- an array of files.
-
getFilesPaths
@CheckForNull public java.lang.String[] getFilesPaths()
-
getFileProperties
public FileProperty[] getFileProperties()
-
isAllowsFiles
public boolean isAllowsFiles()
-
setAllowsFiles
public void setAllowsFiles(boolean allow)
-
getValueStringRepresentation
public java.lang.String getValueStringRepresentation()
Description copied from class:Property
Returns value's string representation.- Overrides:
getValueStringRepresentation
in classListProperty
- Returns:
- string "null" if property does not have value;
value. toString()
if property has value.
-
areValuesEqual
protected boolean areValuesEqual(java.lang.Object oldValue, java.lang.Object newValue)
Description copied from class:Property
Check if values are equal before setting new value. If values are equal value is not changed.- Overrides:
areValuesEqual
in classProperty
- Parameters:
oldValue
- current value.newValue
- new value.- Returns:
- true if values are equal.
-
clone
public ClassPathEntriesListProperty 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.- Overrides:
clone
in classListProperty
- Returns:
- the cloned property.
-
-