Class FieldProperty
java.lang.Object
nl.tudelft.simulation.introspection.AbstractProperty
nl.tudelft.simulation.introspection.fields.FieldProperty
- All Implemented Interfaces:
Property
The field implementation of the Property interface. See for details.
Copyright (c) 2002-2025 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information DSOL Manual. The DSOL project is distributed under a three-clause BSD-style license, which can be found at DSOL License.
- Since:
- 1.5
- Author:
- Peter Jacobs , Alexander Verbraeck, Niels Lang.
-
Constructor Summary
ConstructorsConstructorDescriptionFieldProperty(Object owner, Field descriptor) constructs a new FieldProperty.FieldProperty(Object owner, Field descriptor, boolean editable) constructs a new FieldProperty. -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the introspected object, which contains this Property.getName()Retrieves the name of the property.Class<?>getType()Returns the type of this property's value.getValue()Returns the current value of this property.booleanReturns whether the value of this property may be altered.voidsetRegularValue(Object value) Method used to set a regular (i.e. not-composite) property value.Methods inherited from class nl.tudelft.simulation.introspection.AbstractProperty
getComponentType, getComposedType, setValue, toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface nl.tudelft.simulation.introspection.Property
getComponentType, getComposedType, setValue
-
Constructor Details
-
FieldProperty
constructs a new FieldProperty.- Parameters:
owner- its ownerdescriptor- the descriptoreditable- is the property editable
-
FieldProperty
constructs a new FieldProperty.- Parameters:
owner- its ownerdescriptor- the descriptor
-
-
Method Details
-
getName
Description copied from interface:PropertyRetrieves the name of the property. -
getType
Description copied from interface:PropertyReturns the type of this property's value. -
setRegularValue
Description copied from class:AbstractPropertyMethod used to set a regular (i.e. not-composite) property value.- Specified by:
setRegularValuein classAbstractProperty- Parameters:
value- the new value
-
getValue
Description copied from interface:PropertyReturns the current value of this property. -
getInstance
Description copied from interface:PropertyRetrieves the introspected object, which contains this Property.- Specified by:
getInstancein interfaceProperty- Returns:
- the instance
-
isEditable
public boolean isEditable()Description copied from interface:PropertyReturns whether the value of this property may be altered.- Specified by:
isEditablein interfaceProperty- Returns:
- 'True', when this property's value can be altered, 'false' otherwise.
-