Package ghidra.app.util
Class ByteCopier
- java.lang.Object
-
- ghidra.app.util.ByteCopier
-
public abstract class ByteCopier extends java.lang.ObjectBase class that can copy bytes into a Transferable object, and paste bytes into a program.
-
-
Nested Class Summary
Nested Classes Change Modifier and Type Class Description static classByteCopier.ByteStringTransferablestatic classByteCopier.ProgrammingByteStringTransferable
-
Field Summary
Fields Change Modifier and Type Field Description static java.awt.datatransfer.DataFlavorBYTE_STRING_FLAVORstatic ClipboardTypeBYTE_STRING_NO_SPACE_TYPEstatic java.awt.datatransfer.DataFlavorBYTE_STRING_NO_SPACES_FLAVORstatic ClipboardTypeBYTE_STRING_TYPENEW static java.awt.datatransfer.DataFlavorCPP_BYTE_ARRAY_FLAVORNEW static ClipboardTypeCPP_BYTE_ARRAY_TYPEprotected ProgramLocationcurrentLocationprotected ProgramcurrentProgramprotected ProgramSelectioncurrentSelectionprotected static java.util.List<ClipboardType>EMPTY_LISTNEW static java.awt.datatransfer.DataFlavorPYTHON_BYTE_STRING_FLAVORNEW static ClipboardTypePYTHON_BYTE_STRING_TYPENEW static java.awt.datatransfer.DataFlavorPYTHON_LIST_FLAVORNEW static ClipboardTypePYTHON_LIST_TYPEprotected PluginTooltool
-
Constructor Summary
Constructors Change Modifier Constructor Description protectedByteCopier()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Change Modifier and Type Method Description NEW protected java.awt.datatransfer.TransferablecopyBytes(ClipboardType copyType, TaskMonitor monitor)protected java.awt.datatransfer.TransferablecopyBytes(AddressSetView addresses, boolean includeSpaces, TaskMonitor monitor)protected java.lang.StringcopyBytesAsString(AddressSetView addresses, boolean includeSpaces, TaskMonitor monitor)NEW protected java.lang.StringcopyBytesAsString(AddressSetView addresses, java.lang.String delimiter, TaskMonitor monitor)static java.awt.datatransfer.TransferablecreateStringTransferable(java.lang.String text)Create a Transferable from the given text.NEW protected AddressSetViewgetSelectedAddresses()protected booleanpasteBytes(java.awt.datatransfer.Transferable pasteData)protected booleanpasteByteString(java.lang.String string)REMOVED TransferablecopyBytes(boolean includeSpaces, TaskMonitor monitor) (Removed)REMOVED booleansupportsPasteTransferable(Transferable transferable) (Removed)REMOVED booleanisValidBytesTransferable(Transferable transferable) (Removed)
-
-
-
Field Detail
-
BYTE_STRING_FLAVOR
public static java.awt.datatransfer.DataFlavor BYTE_STRING_FLAVOR
-
BYTE_STRING_NO_SPACES_FLAVOR
public static java.awt.datatransfer.DataFlavor BYTE_STRING_NO_SPACES_FLAVOR
-
PYTHON_BYTE_STRING_FLAVOR NEW
public static java.awt.datatransfer.DataFlavor PYTHON_BYTE_STRING_FLAVOR
-
EMPTY_LIST
protected static final java.util.List<ClipboardType> EMPTY_LIST
-
BYTE_STRING_TYPE
public static final ClipboardType BYTE_STRING_TYPE
-
BYTE_STRING_NO_SPACE_TYPE
public static final ClipboardType BYTE_STRING_NO_SPACE_TYPE
-
PYTHON_BYTE_STRING_TYPE NEW
public static final ClipboardType PYTHON_BYTE_STRING_TYPE
-
PYTHON_LIST_TYPE NEW
public static final ClipboardType PYTHON_LIST_TYPE
-
CPP_BYTE_ARRAY_TYPE NEW
public static final ClipboardType CPP_BYTE_ARRAY_TYPE
-
tool
protected PluginTool tool
-
currentProgram
protected Program currentProgram
-
currentSelection
protected ProgramSelection currentSelection
-
currentLocation
protected ProgramLocation currentLocation
-
-
Method Detail
-
getSelectedAddresses NEW
protected AddressSetView getSelectedAddresses()
-
copyBytes
protected java.awt.datatransfer.Transferable copyBytes(AddressSetView addresses, boolean includeSpaces, TaskMonitor monitor)
-
copyBytesAsString
protected java.lang.String copyBytesAsString(AddressSetView addresses, boolean includeSpaces, TaskMonitor monitor)
-
copyBytesAsString NEW
protected java.lang.String copyBytesAsString(AddressSetView addresses, java.lang.String delimiter, TaskMonitor monitor)
-
copyBytes NEW
protected java.awt.datatransfer.Transferable copyBytes(ClipboardType copyType, TaskMonitor monitor)
-
pasteBytes
protected boolean pasteBytes(java.awt.datatransfer.Transferable pasteData) throws java.awt.datatransfer.UnsupportedFlavorException, java.io.IOException- Throws:
java.awt.datatransfer.UnsupportedFlavorExceptionjava.io.IOException
-
pasteByteString
protected boolean pasteByteString(java.lang.String string)
-
createStringTransferable
public static java.awt.datatransfer.Transferable createStringTransferable(java.lang.String text)
Create a Transferable from the given text.- Parameters:
text- text used to create a Transferable- Returns:
- a Transferable
-
-