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
ClassPathEntriesListPropertyrepresents a property for storing and editing entries of the classpath.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanallowsFiles-
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 newClassPathEntriesListPropertyobject.ClassPathEntriesListProperty(java.lang.String id, java.lang.Object[] value, boolean allowFiles)Creates and initializes a newClassPathEntriesListPropertyobject from specified parameters.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(PropertyVisitor visitor)Accepts the given visitor.protected booleanareValuesEqual(java.lang.Object oldValue, java.lang.Object newValue)Check if values are equal before setting new value.ClassPathEntriesListPropertyclone()Clones the property.java.lang.StringgetClassType()Returns a class type of the property.FileProperty[]getFileProperties()java.io.File[]getFiles()Returns an array of files.java.lang.String[]getFilesPaths()java.lang.StringgetValueStringRepresentation()Returns value's string representation.booleanisAllowsFiles()voidsetAllowsFiles(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, areEqualByValue, 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 newClassPathEntriesListPropertyobject.
-
ClassPathEntriesListProperty
public ClassPathEntriesListProperty(java.lang.String id, @CheckForNull java.lang.Object[] value, boolean allowFiles)Creates and initializes a newClassPathEntriesListPropertyobject 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:
getClassTypein interfacePropertyVisitorAcceptor- Overrides:
getClassTypein 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:ListPropertyAccepts the given visitor.- Specified by:
acceptin interfacePropertyVisitorAcceptor- Overrides:
acceptin 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:PropertyReturns value's string representation.- Overrides:
getValueStringRepresentationin 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:PropertyCheck if values are equal before setting new value. If values are equal value is not changed.- Overrides:
areValuesEqualin classProperty- Parameters:
oldValue- current value.newValue- new value.- Returns:
- true if values are equal.
-
clone
public ClassPathEntriesListProperty 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.- Overrides:
clonein classListProperty- Returns:
- the cloned property.
-
-