Class JavaScriptValue

  • All Implemented Interfaces:
    java.io.Serializable, JSONAware
    Direct Known Subclasses:
    JavaScriptValue

    public class JavaScriptValue
    extends java.lang.Object
    implements JSONAware, java.io.Serializable
    Used to generate a snippet of the JavaScript code.
    Since:
    6.0.0
    Author:
    tomyeh
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaScriptValue​(java.lang.String js)
      Constructor
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object o)  
      int hashCode()  
      java.lang.String toJSONString()  
      • Methods inherited from class java.lang.Object

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

      • JavaScriptValue

        public JavaScriptValue​(java.lang.String js)
        Constructor
        Parameters:
        js - the snippet of the JavaScript code. For example, "{what: 123, another: 'a'}". The content is generated directly to the AU response, so it must be a valid JavaScript code.
    • Method Detail

      • toJSONString

        public java.lang.String toJSONString()
        Specified by:
        toJSONString in interface JSONAware
        Returns:
        JSON text
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object