Class LaunchTarget
- java.lang.Object
-
- org.eclipse.core.runtime.PlatformObject
-
- org.eclipse.launchbar.core.internal.target.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.Preferencesattributesprivate java.lang.Stringidprivate java.lang.StringtypeId-
Fields inherited from interface org.eclipse.launchbar.core.target.ILaunchTarget
ATTR_ARCH, ATTR_OS, NULL_TARGET
-
-
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 booleanequals(java.lang.Object obj)java.lang.StringgetAttribute(java.lang.String key, java.lang.String defValue)Return a string attribute of this targetjava.util.Map<java.lang.String,java.lang.String>getAttributes()Returns a read-only map of the attributes.java.lang.StringgetId()The id for the target.java.lang.StringgetTypeId()The type of the target.ILaunchTargetWorkingCopygetWorkingCopy()Create a working copy of this launch target to allow setting of attributes.inthashCode()-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.launchbar.core.target.ILaunchTarget
getName
-
-
-
-
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:ILaunchTargetThe id for the target. It is unique for each type.- Specified by:
getIdin interfaceILaunchTarget- Returns:
- id for the target.
-
getTypeId
public java.lang.String getTypeId()
Description copied from interface:ILaunchTargetThe type of the target.- Specified by:
getTypeIdin interfaceILaunchTarget- Returns:
- type of the target
-
getWorkingCopy
public ILaunchTargetWorkingCopy getWorkingCopy()
Description copied from interface:ILaunchTargetCreate 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:
getWorkingCopyin interfaceILaunchTarget- Returns:
- launch target working copy
-
getAttribute
public java.lang.String getAttribute(java.lang.String key, java.lang.String defValue)Description copied from interface:ILaunchTargetReturn a string attribute of this target- Specified by:
getAttributein interfaceILaunchTarget- Parameters:
key- keydefValue- default value- Returns:
- value of attribute
-
getAttributes
public java.util.Map<java.lang.String,java.lang.String> getAttributes()
Description copied from interface:ILaunchTargetReturns a read-only map of the attributes.- Specified by:
getAttributesin interfaceILaunchTarget- Returns:
- the attributes for this target
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
-