Interface PropertySet

All Known Subinterfaces:
CodeUnit, Data, Instruction
All Known Implementing Classes:
DataStub, InstructionDB, InstructionStub, PseudoData, PseudoInstruction

public interface PropertySet
  • Method Details

    • setProperty

      <T extends Saveable> void setProperty(String name, T value) throws IllegalArgumentException
      Set the named property with the given Saveable value.
      Type Parameters:
      T - Saveable implementation
      Parameters:
      name - the name of the property.
      value - value to be stored.
      Throws:
      IllegalArgumentException - if value type is inconsistent with named map
      TypeMismatchException - if a propertyMap named propertyName exists but is not an ObjectPropertyMap.
    • setProperty

      void setProperty(String name, String value)
      Set the named string property with the given value.
      Parameters:
      name - the name of the property.
      value - value to be stored.
      Throws:
      TypeMismatchException - if a propertyMap named propertyName exists but is not a StringPropertyMap.
    • setProperty

      void setProperty(String name, int value)
      Set the named integer property with the given value.
      Parameters:
      name - the name of the property.
      value - value to be stored.
      Throws:
      TypeMismatchException - if a propertyMap named propertyName exists but is not an IntPropertyMap.
    • setProperty

      void setProperty(String name)
      Set the named property. This method is used for "void" properites. The property is either set or not set - there is no value
      Parameters:
      name - the name of the property.
      Throws:
      TypeMismatchException - if a propertyMap named propertyName exists but is not a VoidPropertyMap.
    • getObjectProperty

      Saveable getObjectProperty(String name)
      Get the object property for name; returns null if there is no name property for this code unit.
      Parameters:
      name - the name of the property
      Returns:
      Saveable property value, with map-specific implementation class, or null.
      Throws:
      TypeMismatchException - if a propertyMap named propertyName exists but is not an ObjectPropertyMap.
    • getStringProperty

      String getStringProperty(String name)
      Get the string property for name; returns null if there is no name property for this code unit.
      Parameters:
      name - the name of the property
      Returns:
      string property value or null
      Throws:
      TypeMismatchException - if a propertyMap named propertyName exists but is not an StringPropertyMap.
    • getIntProperty

      int getIntProperty(String name) throws NoValueException
      Get the int property for name.
      Parameters:
      name - the name of the property
      Returns:
      integer property value property has been set
      Throws:
      NoValueException - if there is not name property for this code unit
      TypeMismatchException - if a propertyMap named propertyName exists but is not an IntPropertyMap.
    • hasProperty

      boolean hasProperty(String name)
      Returns true if the codeunit has the given property defined. This method works for all property map types.
      Parameters:
      name - the name of the property
      Returns:
      true if property has been set, else false
    • getVoidProperty

      boolean getVoidProperty(String name)
      Returns whether this code unit is marked as having the name property.
      Parameters:
      name - the name of the property
      Returns:
      true if property has been set, else false
      Throws:
      TypeMismatchException - if a propertyMap named propertyName exists but is not an VoidPropertyMap.
    • propertyNames

      Iterator<String> propertyNames()
      Get an iterator over the property names which have values applied.
      Returns:
      iterator of all property map names which have values applied
    • removeProperty

      void removeProperty(String name)
      Remove the property value associated with the given name .
      Parameters:
      name - the name of the property