Class ModelASTValue

    • Method Detail

      • isLiteral

        public abstract boolean isLiteral()
        If the value can be determined without side-effect at AST parsing time, this method returns true, and getValue() returns its value.
        Returns:
        true if the value can be determined without side-effects at AST parsing time.
      • getValue

        public Object getValue()
        Returns a value or an expression that represents this value. This model is used at the compile time, so it's not always possible to obtain the actual value. Imagine something like secret('12345') or even pow(2,10). In case the value is an expression, this method returns a string represntation suitable for the editor. For example, if the value is foobar(x), we want the editor to show "${foobar(x)}"
        Returns:
        returens the value or an expression that represents this value.
      • toJSON

        @NonNull
        public net.sf.json.JSONObject toJSON()
        Description copied from class: ModelASTElement
        Translates this element and any children it may have into JSON conforming to the schema.
        Specified by:
        toJSON in interface ModelASTMarkerInterface
        Specified by:
        toJSON in class ModelASTElement
        Returns:
        Generally a JSONObject or JSONArray but for some leaf nodes, may be a String or other simple class.