Package ghidra.program.model.data

# Class DataTypeTransferable

java.lang.Object
ghidra.program.model.data.DataTypeTransferable

All Implemented Interfaces:
  `ClipboardOwner`, `Transferable`

public class DataTypeTransferable extends Object implements Transferable, ClipboardOwner
Defines data that is available for drag/drop and clipboard transfers. The data is a DataType object.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `static final DataFlavor`
  `localBuiltinDataTypeFlavor`
  `static final DataFlavor`
  `localDataTypeFlavor`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DataTypeTransferable(DataType dt)`
  Constructor

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `getTransferData(DataFlavor f)`
  Return the transfer data with the given data flavor.
  `DataFlavor[]`
  `getTransferDataFlavors()`
  Return all data flavors that this class supports.
  `boolean`
  `isDataFlavorSupported(DataFlavor f)`
  Return whether the specifed data flavor is supported.
  `void`
  `lostOwnership(Clipboard clipboard, Transferable contents)`
  ClipboardOwner interface method.
  `String`
  `toString()`
  Get the string representation for this transferable.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- ## Field Details

  - ### localDataTypeFlavor

    public static final DataFlavor localDataTypeFlavor

  - ### localBuiltinDataTypeFlavor

    public static final DataFlavor localBuiltinDataTypeFlavor

- ## Constructor Details

  - ### DataTypeTransferable

    public DataTypeTransferable(DataType dt)
    Constructor
    Parameters:
      `dt` - the dataType being transfered

- ## Method Details

  - ### getTransferDataFlavors

    public DataFlavor[] getTransferDataFlavors()
    Return all data flavors that this class supports.
    Specified by:
      `getTransferDataFlavors` in interface `Transferable`

  - ### isDataFlavorSupported

    public boolean isDataFlavorSupported(DataFlavor f)
    Return whether the specifed data flavor is supported.
    Specified by:
      `isDataFlavorSupported` in interface `Transferable`

  - ### getTransferData

    public Object getTransferData(DataFlavor f) throws UnsupportedFlavorException, IOException
    Return the transfer data with the given data flavor.
    Specified by:
      `getTransferData` in interface `Transferable`
    Throws:
      `UnsupportedFlavorException`
      `IOException`

  - ### toString

    public String toString()
    Get the string representation for this transferable.
    Overrides:
      `toString` in class `Object`

  - ### lostOwnership

    public void lostOwnership(Clipboard clipboard, Transferable contents)
    ClipboardOwner interface method.
    Specified by:
      `lostOwnership` in interface `ClipboardOwner`