Class ConstraintUtils


  • public class ConstraintUtils
    extends java.lang.Object
    Utility class for escaping EcmaScript and Java control characters. This class provides methods for translating characters into their escaped equivalents, specifically for EcmaScript.
    • Constructor Summary

      Constructors 
      Constructor Description
      ConstraintUtils()  
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String escapeEcmaScript​(java.lang.String input)
      Escapes the given input string using EcmaScript rules.
      • Methods inherited from class java.lang.Object

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

      • ConstraintUtils

        public ConstraintUtils()
    • Method Detail

      • escapeEcmaScript

        public static java.lang.String escapeEcmaScript​(java.lang.String input)
        Escapes the given input string using EcmaScript rules. The method escapes control characters and symbols such as single quotes, double quotes, backslashes, and forward slashes, making the string safe for use in EcmaScript contexts.
        Parameters:
        input - the string to escape, may be null
        Returns:
        the escaped string or null if the input is null