Is it possible to call a static method from a Thymeleaf textual template?

[Official guide](https://www.thymeleaf.org/doc/tutorials/3.0/usingthymeleaf.html#preprocessing) mentions that it should be possible to call a method like this:

```
<p th:text="${@myapp.translator.Translator@translateToFrench(textVar)}">Some text here...</p>

```

When I try to use it in my textual template (TemplateResolver's mode is set to TemplateMode.TEXT), I get a this exception:

```
org.thymeleaf.exceptions.TemplateProcessingException: Exception evaluating OGNL expression: "@java.lang.System@currentTimeMillis()" (template: "template.txt" - line 1, col 18)

```

Here is my sample template:

```
System millis: [(${@java.lang.System@currentTimeMillis()})]

```

After googling for a while, I also found this form of calling methods:

```
System millis: [(${T(java.lang.System).currentTimeMillis()})]

```

which fails with the same error.

What I need to do is somehow allow usage of a custom number formatter class from a template (functionality of the `#numbers` utility object is not rich enough for my case).
I can call methods on a non-static class by providing it as a context variable like this:

```
Some value: [(${formatter.format(someValue)})]

```

but it would be easier for me to use a static class without a need to explicitly adding it to each template's context.

BTW, I do not use Spring, just pure Thymeleaf.

Update
------

I should've spend more time to analyze the stack trace of the Thymeleaf exception I got.
It turns out, that the root cause of this behavior was the `org.thymeleaf.exceptions.TemplateProcessingException: Instantiation of new objects and access to static classes is forbidden in this context` exception, which is results from this change: <https://github.com/thymeleaf/thymeleaf/issues/809>

Downgrading to Thymeleaf 3.0.11 "fixes" it.

Now I'm looking for a solution to bypass this new Resctricted mode on the latest Thymeleaf (3.0.12 for the moment). I'm sure it's safe in my case, because I'm the only author of both code and templates.