Class CompileInfo

    • Constructor Detail

      • CompileInfo

        public CompileInfo()
        Default constructor, does nothing.
      • CompileInfo

        public CompileInfo​(CompileInfo compileInfo)
        Constructor that clones an existing CompileInfo object.
        Parameters:
        compileInfo - original to clone
      • CompileInfo

        public CompileInfo​(org.json.JSONObject compileInfoJson)
        Constructor from json parsed object.

        Will find different properties in the json object and populate the object.

        Parameters:
        compileInfoJson - json object containing the properties
    • Method Detail

      • toJson

        public String toJson()
        Serializes the object to a JSON String.
        Returns:
        String the object as a JSON String
      • setLanguage

        public CompileInfo setLanguage​(String language)
        Sets the language, for instance 'en_US' or 'fr_FR'.
        Parameters:
        language - the language
        Returns:
        this to set further options
      • setName

        public CompileInfo setName​(String name)
        Sets the name of the output function.

        This is only useful for 'compileFileClient', 'compileClient' and 'compile' methods.

        Parameters:
        name - name of the output function
        Returns:
        this to set further options
      • setCompileDebug

        public CompileInfo setCompileDebug​(Boolean compileDebug)
        Activates compile debug Pug option.

        Is true by default in Pug.

        Parameters:
        compileDebug - activates or not compileDebug
        Returns:
        this to set further options
      • setEmbedResources

        public CompileInfo setEmbedResources​(Boolean embedResources)
        Embed resources in the compiled function.

        Useful for client-side rendering only.

        Parameters:
        embedResources - true to embed resources
        Returns:
        this to set further options
      • setWords

        public CompileInfo setWords​(List<String> words)
        Set words to embed.

        Useful for client-side rendering only.

        Parameters:
        words - list of words to embed
        Returns:
        this to set further options
      • setVerbs

        public CompileInfo setVerbs​(List<String> verbs)
        Set verbs to embed.

        Useful for client-side rendering only.

        Parameters:
        verbs - list of verbs to embed
        Returns:
        this to set further options
      • setAdjectives

        public CompileInfo setAdjectives​(List<String> adjectives)
        Set adjectives to embed.

        Useful for client-side rendering only.

        Parameters:
        adjectives - list of adjectives to embed
        Returns:
        this to set further options
      • getLanguage

        public String getLanguage()
        Returns the language.
        Returns:
        language