Package ghidra.util.table.field
Class AbstractReferenceBytesTableColumn
- java.lang.Object
-
- docking.widgets.table.AbstractDynamicTableColumn<ROW_TYPE,COLUMN_TYPE,DATA_SOURCE>
-
- docking.widgets.table.DynamicTableColumnExtensionPoint<ROW_TYPE,COLUMN_TYPE,Program>
-
- ghidra.util.table.field.ProgramLocationTableColumnExtensionPoint<ReferenceAddressPair,java.lang.Byte[]>
-
- ghidra.util.table.field.AbstractReferenceBytesTableColumn
-
- All Implemented Interfaces:
DynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
,ExtensionPoint
,ProgramBasedDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[]>
,ProgramLocationTableColumn<ReferenceAddressPair,java.lang.Byte[]>
- Direct Known Subclasses:
ReferenceFromBytesTableColumn
,ReferenceToBytesTableColumn
public abstract class AbstractReferenceBytesTableColumn extends ProgramLocationTableColumnExtensionPoint<ReferenceAddressPair,java.lang.Byte[]>
This table field displays the bytes of the code unit at the ToAddress for the reference or possible reference address pair associated with a row in the table.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface ghidra.util.classfinder.ExtensionPoint
ExtensionPoint.Exclude, ExtensionPoint.Util
-
-
Field Summary
-
Fields inherited from class docking.widgets.table.AbstractDynamicTableColumn
FLOATING_POINT_PRECISION_SETTING, FLOATING_POINT_SETTINGS_DEFINITIONS, INTEGER_RADIX_SETTING, INTEGER_SETTINGS_DEFINITIONS, INTEGER_SIGNEDNESS_MODE_SETTING, NO_SETTINGS_DEFINITIONS
-
-
Constructor Summary
Constructors Constructor Description AbstractReferenceBytesTableColumn()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract Address
getAddress(ReferenceAddressPair pair)
java.lang.String
getColumnDisplayName(Settings settings)
Determines the column heading that will be displayed.protected abstract java.lang.String
getColumnNamePrefix()
GColumnRenderer<java.lang.Byte[]>
getColumnRenderer()
Returns the optional cell renderer for this column; null if no renderer is used.int
getMaxLines(Settings settings)
Gets the maximum number of text display lines needed for any given cell with the specified settings.ProgramLocation
getProgramLocation(ReferenceAddressPair rowObject, Settings settings, Program program, ServiceProvider serviceProvider)
Determines an appropriate program location associated with this field for the indicated row object.SettingsDefinition[]
getSettingsDefinitions()
Returns a list of settings definitions for this field.java.lang.Byte[]
getValue(ReferenceAddressPair rowObject, Settings settings, Program pgm, ServiceProvider serviceProvider)
Creates an object that is appropriate for this field (table column) and for the object that is associated with this row of the table.-
Methods inherited from class docking.widgets.table.AbstractDynamicTableColumn
equals, getColumnClass, getColumnDescription, getColumnName, getColumnPreferredWidth, getComparator, getSupportedRowType, getUniqueIdentifier, hashCode, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface docking.widgets.table.DynamicTableColumn
getColumnClass, getColumnDescription, getColumnName, getColumnPreferredWidth, getComparator, getSupportedRowType, getUniqueIdentifier
-
-
-
-
Method Detail
-
getAddress
protected abstract Address getAddress(ReferenceAddressPair pair)
-
getColumnNamePrefix
protected abstract java.lang.String getColumnNamePrefix()
-
getValue
public java.lang.Byte[] getValue(ReferenceAddressPair rowObject, Settings settings, Program pgm, ServiceProvider serviceProvider) throws java.lang.IllegalArgumentException
Description copied from interface:DynamicTableColumn
Creates an object that is appropriate for this field (table column) and for the object that is associated with this row of the table.- Specified by:
getValue
in interfaceDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Specified by:
getValue
in classAbstractDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Parameters:
rowObject
- the object associated with the row in the table.settings
- field settingspgm
- the expected data object, as defined by the DATA_SOURCE typeserviceProvider
- theServiceProvider
associated with the table.- Returns:
- the object for the model to display in the table cell.
- Throws:
java.lang.IllegalArgumentException
- if the rowObject is not one supported by this class.
-
getProgramLocation
public ProgramLocation getProgramLocation(ReferenceAddressPair rowObject, Settings settings, Program program, ServiceProvider serviceProvider)
Description copied from interface:ProgramLocationTableColumn
Determines an appropriate program location associated with this field for the indicated row object. The most probable use is for navigating from the field.- Parameters:
rowObject
- the object associated with the table row.settings
- field settingsprogram
- the program associated with the table.serviceProvider
- the plugin tool associated with the table.- Returns:
- the address associated with the field.
-
getColumnDisplayName
public java.lang.String getColumnDisplayName(Settings settings)
Description copied from interface:DynamicTableColumn
Determines the column heading that will be displayed.- Specified by:
getColumnDisplayName
in interfaceDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Overrides:
getColumnDisplayName
in classAbstractDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Returns:
- the field name to display as the column heading.
-
getMaxLines
public int getMaxLines(Settings settings)
Description copied from interface:DynamicTableColumn
Gets the maximum number of text display lines needed for any given cell with the specified settings.- Specified by:
getMaxLines
in interfaceDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Overrides:
getMaxLines
in classAbstractDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Parameters:
settings
- field settings- Returns:
- maximum number of lines needed
-
getColumnRenderer
public GColumnRenderer<java.lang.Byte[]> getColumnRenderer()
Description copied from interface:DynamicTableColumn
Returns the optional cell renderer for this column; null if no renderer is used.This method allows columns to define custom rendering. The interface returned here ensures that the text used for filtering matches what the users sees (via the
GColumnRenderer.getFilterString(Object, Settings)
method).Note: some types should not make use of the aforementioned filter string. These types include the
Number
wrapper types,Date
andEnum
s. (This is because the filtering system works naturally with these types.) SeeGColumnRenderer
.- Specified by:
getColumnRenderer
in interfaceDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Overrides:
getColumnRenderer
in classAbstractDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Returns:
- the renderer
-
getSettingsDefinitions
public SettingsDefinition[] getSettingsDefinitions()
Description copied from interface:DynamicTableColumn
Returns a list of settings definitions for this field.- Specified by:
getSettingsDefinitions
in interfaceDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Overrides:
getSettingsDefinitions
in classAbstractDynamicTableColumn<ReferenceAddressPair,java.lang.Byte[],Program>
- Returns:
- list of settings definitions for this field.
-
-