Class LaunchTarget

  • All Implemented Interfaces:
    org.eclipse.core.runtime.IAdaptable, ILaunchTarget

    public class LaunchTarget
    extends org.eclipse.core.runtime.PlatformObject
    implements ILaunchTarget
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) org.osgi.service.prefs.Preferences attributes  
      private java.lang.String id  
      private java.lang.String typeId  
    • Constructor Summary

      Constructors 
      Constructor Description
      LaunchTarget​(java.lang.String typeId, java.lang.String id)
      This should only be used to create the null target.
      LaunchTarget​(java.lang.String typeId, java.lang.String id, org.osgi.service.prefs.Preferences attributes)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.lang.String getAttribute​(java.lang.String key, java.lang.String defValue)
      Return a string attribute of this target
      java.util.Map<java.lang.String,​java.lang.String> getAttributes()
      Returns a read-only map of the attributes.
      java.lang.String getId()
      The id for the target.
      java.lang.String getTypeId()
      The type of the target.
      ILaunchTargetWorkingCopy getWorkingCopy()
      Create a working copy of this launch target to allow setting of attributes.
      int hashCode()  
      • Methods inherited from class org.eclipse.core.runtime.PlatformObject

        getAdapter
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.eclipse.core.runtime.IAdaptable

        getAdapter
    • Field Detail

      • typeId

        private final java.lang.String typeId
      • id

        private final java.lang.String id
      • attributes

        final org.osgi.service.prefs.Preferences attributes
    • Constructor Detail

      • LaunchTarget

        public LaunchTarget​(java.lang.String typeId,
                            java.lang.String id)
        This should only be used to create the null target. There are no attributes supported on the null target.
      • LaunchTarget

        public LaunchTarget​(java.lang.String typeId,
                            java.lang.String id,
                            org.osgi.service.prefs.Preferences attributes)
    • Method Detail

      • getId

        public java.lang.String getId()
        Description copied from interface: ILaunchTarget
        The id for the target. It is unique for each type.
        Specified by:
        getId in interface ILaunchTarget
        Returns:
        id for the target.
      • getTypeId

        public java.lang.String getTypeId()
        Description copied from interface: ILaunchTarget
        The type of the target.
        Specified by:
        getTypeId in interface ILaunchTarget
        Returns:
        type of the target
      • getWorkingCopy

        public ILaunchTargetWorkingCopy getWorkingCopy()
        Description copied from interface: ILaunchTarget
        Create a working copy of this launch target to allow setting of attributes. It also allows changing the id, which results in a new launch target when saved.
        Specified by:
        getWorkingCopy in interface ILaunchTarget
        Returns:
        launch target working copy
      • getAttribute

        public java.lang.String getAttribute​(java.lang.String key,
                                             java.lang.String defValue)
        Description copied from interface: ILaunchTarget
        Return a string attribute of this target
        Specified by:
        getAttribute in interface ILaunchTarget
        Parameters:
        key - key
        defValue - default value
        Returns:
        value of attribute
      • getAttributes

        public java.util.Map<java.lang.String,​java.lang.String> getAttributes()
        Description copied from interface: ILaunchTarget
        Returns a read-only map of the attributes.
        Specified by:
        getAttributes in interface ILaunchTarget
        Returns:
        the attributes for this target
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object