org.ajax4jsf.javascript

## Class JSLiteral

- java.lang.Object
- - org.ajax4jsf.javascript.ScriptStringBase
  - - org.ajax4jsf.javascript.JSLiteral

- All Implemented Interfaces:
    Serializable, ScriptString
  Direct Known Subclasses:
    NullConverterScript

      public class JSLiteral
      extends ScriptStringBase
      implements Serializable

  Class provides creation of simple literal javascript to be set in ajax response data
  Author:
    Andrey Markavtsov
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static JSLiteral` | `EMPTY_HASH`
    `static JSLiteral` | `EMPTY_LIST`

    - ### Fields inherited from class org.ajax4jsf.javascript.ScriptStringBase

      `COLON, COMMA, DOT, EMPTY_STRING, EQUALS, FUNCTION, LEFT_CURLY_BRACKET, LEFT_ROUND_BRACKET, LEFT_SQUARE_BRACKET, RIGHT_CURLY_BRACKET, RIGHT_ROUND_BRACKET, RIGHT_SQUARE_BRACKET`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `JSLiteral(String literal)` Constructor using literal parameter

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `appendScript(Appendable target)` Append JavaScript code to @link `Appendable`
    `String` | `getLiteral()`

    - ### Methods inherited from class org.ajax4jsf.javascript.ScriptStringBase

      `appendScriptToStringBuilder, toScript, toString`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### EMPTY_HASH

          public static final JSLiteral EMPTY_HASH

    - #### EMPTY_LIST

          public static final JSLiteral EMPTY_LIST

  - ### Constructor Detail

    - #### JSLiteral

          public JSLiteral(String literal)

      Constructor using literal parameter
      Parameters:
        `literal` -

  - ### Method Detail

    - #### appendScript

          public void appendScript(Appendable target)
                            throws IOException

      Description copied from interface: `ScriptString`
      Append JavaScript code to @link `Appendable`
      Specified by:
        `appendScript` in interface `ScriptString`
      Throws:
        `IOException`

    - #### getLiteral

          public String getLiteral()

      Returns:
        the literal

Copyright © 2016 JBoss by Red Hat. All Rights Reserved.