Class MarkException.RestrictedMarkAlreadyPresent

  • All Implemented Interfaces:
    Serializable
    Enclosing class:
    MarkException

    public static class MarkException.RestrictedMarkAlreadyPresent
    extends MarkException.ConstraintViolation
    Indicates that a request to disable marks on a given node cannot proceed because the target node is already marked. For example, within a codeBlock node, the text nodes it contains are not permitted to have any marks. This exception is thrown if the caller attempts to add a text node with marks on it to a codeBlock, because the codeBlock will request the text node to disable marking, which it cannot do with marks already present on it.
    See Also:
    Serialized Form
    • Constructor Detail

      • RestrictedMarkAlreadyPresent

        public RestrictedMarkAlreadyPresent​(String reason,
                                            Map<String,​?> marks)
      • RestrictedMarkAlreadyPresent

        public RestrictedMarkAlreadyPresent​(String reason,
                                            Collection<String> markTypes)
    • Method Detail

      • reason

        public String reason()
        Returns:
        the reason that marks should be disabled
      • markTypes

        public List<String> markTypes()
        Returns:
        the marks that were already present when the request to disable them was made