Class Example


  • public final class Example
    extends java.lang.Object
    Helper class to create error examples. For internal use by LanguageTool only.
    Since:
    2.5
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      private Example()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static CorrectExample fixed​(java.lang.String example)
      Create an example text (usually just one sentence) without an error - the fixed error (compared to the text created with wrong(String)) can be marked with <marker>...</marker>.
      private static void requireMarkup​(java.lang.String example)  
      static IncorrectExample wrong​(java.lang.String example)
      Create an example text (usually just one sentence) with an error - the error must be marked with <marker>...</marker>.
      • Methods inherited from class java.lang.Object

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

      • Example

        private Example()
    • Method Detail

      • wrong

        public static IncorrectExample wrong​(java.lang.String example)
        Create an example text (usually just one sentence) with an error - the error must be marked with <marker>...</marker>.
        Throws:
        java.lang.IllegalArgumentException - if the <marker>...</marker> is missing
        Since:
        2.5
      • fixed

        public static CorrectExample fixed​(java.lang.String example)
        Create an example text (usually just one sentence) without an error - the fixed error (compared to the text created with wrong(String)) can be marked with <marker>...</marker>.
        Since:
        2.5, return type modified in 3.5
      • requireMarkup

        private static void requireMarkup​(java.lang.String example)