Class BeanProperty
java.lang.Object
nl.tudelft.simulation.introspection.AbstractProperty
nl.tudelft.simulation.introspection.beans.BeanProperty
- All Implemented Interfaces:
Property
The JavaBean TM implementation of the Property interface. See {see BeanIntrospector}for details.
Copyright (c) 2002-2024 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information https://simulation.tudelft.nl. The DSOL project is distributed under a three-clause BSD-style license, which can be found at https://https://simulation.tudelft.nl/dsol/docs/latest/license.html.
- Since:
- 1.5
- Author:
- Peter Jacobs , Alexander Verbraeck, Niels Lang.
-
Constructor Summary
ModifierConstructorDescriptionprotected
BeanProperty
(Object bean, PropertyDescriptor descriptor) constructs a new BeanProperty. -
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.boolean
Returns whether the value of this property may be altered.protected void
setRegularValue
(Object values) Method used to set a regular (i.e. not-composite) property value.Methods inherited from class nl.tudelft.simulation.introspection.AbstractProperty
getComponentType, getComposedType, setValue, toString
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface nl.tudelft.simulation.introspection.Property
getComponentType, getComposedType, setValue
-
Constructor Details
-
BeanProperty
constructs a new BeanProperty.- Parameters:
bean
- Object; the bean to introspectdescriptor
- PropertyDescriptor; the descriptor of the property
-
-
Method Details
-
getName
Retrieves the name of the property. -
getType
Returns the type of this property's value. -
setRegularValue
Method used to set a regular (i.e. not-composite) property value.- Specified by:
setRegularValue
in classAbstractProperty
- Parameters:
values
- Object; the new value
-
getValue
Returns the current value of this property. -
getInstance
Retrieves the introspected object, which contains this Property.- Specified by:
getInstance
in interfaceProperty
- Returns:
- the instance
-
isEditable
public boolean isEditable()Returns whether the value of this property may be altered.- Specified by:
isEditable
in interfaceProperty
- Returns:
- 'True', when this property's value can be altered, 'false' otherwise.
-