Class OperationDescription


  • @Immutable
    public class OperationDescription
    extends java.lang.Object
    An interface describing how an operation should be displayed in the Palette to the user.
    • Method Detail

      • from

        public static OperationDescription from​(java.lang.Class<? extends Operation> clazz)
        Creates an operation description from a @Description annotation on an operation subclass. The class is assumed to have the annotation; be careful when using this method.
        Parameters:
        clazz - the class to generate a description for
      • name

        public java.lang.String name()
        Returns:
        The unique user-facing name of the operation, such as "Gaussian Blur".
      • summary

        public java.lang.String summary()
        Returns:
        A summary of the operation.
      • category

        public OperationCategory category()
        Returns:
        What category the operation falls under. This is used to organize them in the GUI.
      • icon

        public java.util.Optional<java.io.InputStream> icon()
        An InputStream of a 128x128 image to show the user as a representation of the operation.
        Returns:
        The icon to be displayed.
      • aliases

        public com.google.common.collect.ImmutableSet<java.lang.String> aliases()
        This is used to preserve compatibility with old versions of GRIP if the operation name changes.
        Returns:
        Any old unique user-facing names of the operation.
      • equals

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

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

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object