Class PluginReference

  • All Implemented Interfaces:
    IIdentifiable, IMatchRules, IPluginReference

    public class PluginReference
    extends java.lang.Object
    implements IPluginReference
    Implementation of the IPluginReference

    This class may be instantiated. This class is not intended to be sub-classed by clients.

    Since:
    3.4
    See Also:
    IPluginReference
    Restriction:
    This class is not intended to be sub-classed by clients.
    • Constructor Detail

      • PluginReference

        public PluginReference​(java.lang.String id,
                               java.lang.String version,
                               int match)
        Constructs a plug-in reference to be used in the PDE template framework
        Parameters:
        id - the id of the plug-in
        version - the version of the plug-in
        match - the match rule for the plug-in IMatchRules
    • Method Detail

      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • hashCode

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

        public int getMatch()
        Description copied from interface: IPluginReference
        Returns the required match for the imported plug-in. The choices are defined in IMatchRules interface.
        Specified by:
        getMatch in interface IPluginReference
        Returns:
        the desired type of the import plug-in match
        See Also:
        IMatchRules
      • getVersion

        public java.lang.String getVersion()
        Description copied from interface: IPluginReference
        Returns the required version of the plug-in.
        Specified by:
        getVersion in interface IPluginReference
        Returns:
        required version or null if not set
      • setMatch

        public void setMatch​(int match)
                      throws CoreException
        Description copied from interface: IPluginReference
        Sets the match type for the require plug-in. This method will throw a CoreException if the model is not editable.
        Specified by:
        setMatch in interface IPluginReference
        Parameters:
        match - the desired match type
        Throws:
        CoreException - if the model is not editable
        See Also:
        IMatchRules
      • setVersion

        public void setVersion​(java.lang.String version)
                        throws CoreException
        Description copied from interface: IPluginReference
        Sets the desired version of the required plug-in. This method will throw a CoreException if the model is not editable.
        Specified by:
        setVersion in interface IPluginReference
        Parameters:
        version - the required import plug-in version
        Throws:
        CoreException - if the model is not editable
      • getId

        public java.lang.String getId()
        Description copied from interface: IIdentifiable
        Returns a unique id of this object.
        Specified by:
        getId in interface IIdentifiable
        Returns:
        the id of this object
      • setId

        public void setId​(java.lang.String id)
                   throws CoreException
        Description copied from interface: IIdentifiable
        Sets the id of this IIdentifiable to the provided value.
        Specified by:
        setId in interface IIdentifiable
        Parameters:
        id - a new id of this object
        Throws:
        CoreException - If object is not editable.