Class AbstractProperty

java.lang.Object
net.infonode.properties.util.AbstractProperty
All Implemented Interfaces:
Property
Direct Known Subclasses:
ValueHandlerProperty

public abstract class AbstractProperty extends Object implements Property
An abstract base class for properties.
  • Constructor Details

    • AbstractProperty

      protected AbstractProperty(PropertyGroup group, String name, Class type, String description)
      Constructor.
      Parameters:
      group - the property group
      name - the property name
      type - the property type
      description - the property description
  • Method Details

    • getGroup

      public PropertyGroup getGroup()
      Description copied from interface: Property
      Returns the property group that this property belongs to.
      Specified by:
      getGroup in interface Property
      Returns:
      the property group that this property belongs to
    • getName

      public String getName()
      Description copied from interface: Property
      Returns the property name.
      Specified by:
      getName in interface Property
      Returns:
      the property name
    • getType

      public Class getType()
      Description copied from interface: Property
      Returns the value type of this property. The property can only be set to values that are of this class or a sub class of this class.
      Specified by:
      getType in interface Property
      Returns:
      the value type of this property
    • getDescription

      public String getDescription()
      Description copied from interface: Property
      Returns a description of this property.
      Specified by:
      getDescription in interface Property
      Returns:
      a description of this property
    • isMutable

      public boolean isMutable()
      Description copied from interface: Property
      Returns true if this property is mutable.
      Specified by:
      isMutable in interface Property
      Returns:
      true if this property is mutable
    • setValue

      public void setValue(Object object, Object value)
      Description copied from interface: Property
      Sets the value of this property in an object.
      Specified by:
      setValue in interface Property
      Parameters:
      object - the object to set the property value in
      value - the value of the property
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • canBeAssiged

      public boolean canBeAssiged(Object value)
      Description copied from interface: Property
      Returns true if the value can be assigned to this property.
      Specified by:
      canBeAssiged in interface Property
      Parameters:
      value - the value to assign
      Returns:
      true if the value can be assigned to this property