nl.tudelft.simulation.introspection.fields
Class FieldProperty

java.lang.Object
  extended by nl.tudelft.simulation.introspection.AbstractProperty
      extended by nl.tudelft.simulation.introspection.fields.FieldProperty
All Implemented Interfaces:
Property

public class FieldProperty
extends AbstractProperty
implements Property

The field implementation of the Property interface. See for details.

(c) copyright 2002-2005-2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser General Public License (LGPL) , no warranty.

Since:
1.4
Version:
1.1 Apr 15, 2004
Author:
Niels Lang Peter Jacobs

Constructor Summary
FieldProperty(Object owner, Field descriptor)
          constructs a new FieldProperty
FieldProperty(Object owner, Field descriptor, boolean editable)
          constructs a new FieldProperty
 
Method Summary
 Object getInstance()
          Retrieves the introspected object, which contains this Property.
 String getName()
          Retrieves the name of the property.
 Class getType()
          Returns the type of this property's value.
 Object getValue()
          Returns the current value of this property.
 boolean isEditable()
          Returns whether the value of this property may be altered.
 void setRegularValue(Object value)
          Method used to set a regular (i.e.
 
Methods inherited from class nl.tudelft.simulation.introspection.AbstractProperty
getComponentType, isCollection, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface nl.tudelft.simulation.introspection.Property
getComponentType, isCollection, setValue
 

Constructor Detail

FieldProperty

public FieldProperty(Object owner,
                     Field descriptor,
                     boolean editable)
constructs a new FieldProperty

Parameters:
owner - its owner
descriptor - the descriptor
editable - is the property editable

FieldProperty

public FieldProperty(Object owner,
                     Field descriptor)
constructs a new FieldProperty

Parameters:
owner - its owner
descriptor - the descriptor
Method Detail

getName

public String getName()
Description copied from interface: Property
Retrieves the name of the property.

Specified by:
getName in interface Property
Returns:
The name of the property
See Also:
Property.getName()

getType

public Class getType()
Description copied from interface: Property
Returns the type of this property's value.

Specified by:
getType in interface Property
Returns:
A {see java.lang.Class}instance denoting the type of this property.
See Also:
Property.getType()

setRegularValue

public void setRegularValue(Object value)
Description copied from class: AbstractProperty
Method used to set a regular (i.e. not-composite) property value.

Specified by:
setRegularValue in class AbstractProperty
Parameters:
value - the new value
See Also:
#setRegularValue(java.lang.Object)

getValue

public Object getValue()
Description copied from interface: Property
Returns the current value of this property.

Specified by:
getValue in interface Property
Returns:
The current value of this property.
See Also:
Property.getValue()

getInstance

public Object getInstance()
Description copied from interface: Property
Retrieves the introspected object, which contains this Property.

Specified by:
getInstance in interface Property
Returns:
the instance
See Also:
Property.getInstance()

isEditable

public boolean isEditable()
Description copied from interface: Property
Returns whether the value of this property may be altered.

Specified by:
isEditable in interface Property
Returns:
'True', when this property's value can be altered, 'false' otherwise.
See Also:
Property.isEditable()


Copyright © 2002-2011 Delft University of Technology, the Netherlands. All Rights Reserved.