Package ghidra.program.model.util
Interface PropertySet
- All Known Subinterfaces:
CodeUnit
,Data
,Instruction
- All Known Implementing Classes:
DataStub
,InstructionDB
,InstructionStub
,PseudoData
,PseudoInstruction
public interface PropertySet
-
Method Summary
Modifier and TypeMethodDescriptionint
getIntProperty
(String name) Get the int property for name.getObjectProperty
(String name) Get the object property for name; returns null if there is no name property for this code unit.getStringProperty
(String name) Get the string property for name; returns null if there is no name property for this code unit.boolean
getVoidProperty
(String name) Returns whether this code unit is marked as having the name property.boolean
hasProperty
(String name) Returns true if the codeunit has the given property defined.Get an iterator over the property names which have values applied.void
removeProperty
(String name) Remove the property value associated with the given name .void
setProperty
(String name) Set the named property.void
setProperty
(String name, int value) Set the named integer property with the given value.void
setProperty
(String name, String value) Set the named string property with the given value.<T extends Saveable>
voidsetProperty
(String name, T value) Set the named property with the givenSaveable
value.
-
Method Details
-
setProperty
Set the named property with the givenSaveable
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 mapTypeMismatchException
- if a propertyMap named propertyName exists but is not an ObjectPropertyMap.
-
setProperty
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
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
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
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
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
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 unitTypeMismatchException
- if a propertyMap named propertyName exists but is not an IntPropertyMap.
-
hasProperty
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
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
Get an iterator over the property names which have values applied.- Returns:
- iterator of all property map names which have values applied
-
removeProperty
Remove the property value associated with the given name .- Parameters:
name
- the name of the property
-