Class DeprecationInfo


  • public class DeprecationInfo
    extends Object
    Deprecation info for a package or member. This class is not thread safe.
    Since:
    1.1
    • Constructor Detail

      • DeprecationInfo

        public DeprecationInfo​(String msg)
        Create a new info
        Parameters:
        msg - The msg
        Throws:
        IllegalArgumentException - if msg is null
    • Method Detail

      • getMessage

        public String getMessage()
        Get the message
        Returns:
        The message
      • getSince

        public String getSince()
        Get the optional since information
        Returns:
        The since information or null
      • setSince

        public void setSince​(String since)
        Set the since information
        Parameters:
        since - The new info
      • getForRemoval

        public String getForRemoval()
        Get the optional for removal information. This should either be 'true' or 'false' or a date in the format 'YYYY-MM-DD'.
        Returns:
        The for removal information or null
        Since:
        1.3.0
      • setForRemoval

        public void setForRemoval​(String value)
        Set the for removal information. This should either be 'true' or 'false' or a date in the format 'YYYY-MM-DD'.
        Parameters:
        value - The new removal info
        Since:
        1.3.0
      • isForRemoval

        public boolean isForRemoval()
        Is this member intended to be removed?
        Returns:
        true if the member will be removed in the future
        Since:
        1.3.0
      • getForRemovalBy

        public Calendar getForRemovalBy()
        Return a date by which this member will be removed
        Returns:
        A calendar if the value from getForRemoval() is formatted as 'YYYY-MM-DD'.
        Since:
        1.3.0
      • getMode

        public DeprecationValidationMode getMode()
        Get the optional validation mode.
        Returns:
        The mode or null
        Since:
        1.4.0
      • setMode

        public void setMode​(DeprecationValidationMode value)
        Set the validation mode.
        Parameters:
        value - The new mode
        Since:
        1.4.0
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object