Class CustomLabelAwareLabelProvider

  • All Implemented Interfaces:
    LabelProvider

    @Component("tapirCustomLabelAwareLabelProvider")
    public class CustomLabelAwareLabelProvider
    extends java.lang.Object
    implements LabelProvider
    LabelProvider is aware of classes which implement CustomLabeled. getLabel returns the custom label if the class implements CustomLabeled and falls back to toString() otherwise.
    Since:
    2.0.0
    Author:
    Oliver Libutzki <[email protected]>
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getLabel​(java.lang.Object object)
      Returns the label of the given object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CustomLabelAwareLabelProvider

        public CustomLabelAwareLabelProvider()
    • Method Detail

      • getLabel

        public java.lang.String getLabel​(java.lang.Object object)
        Description copied from interface: LabelProvider
        Returns the label of the given object. The default implementation falls back to toString().
        Specified by:
        getLabel in interface LabelProvider
        Parameters:
        object - The object which's label should be returned
        Returns:
        the object's label