'Accessing object's method instead of M2Doc service
I'm trying to access a method of a (Java) object, but M2Doc always tries to find a suitable service instead, which cannot be found. Is there a way to access the method?
Concretely, I have a variable, which contains a BigDecimal object. If I use {m:myBigDecimal}, then the full number is printed, typically with a lot of decimals: 1146.730013716953713173.
To truncate that, I'd prefer to use the setScale(int) method of BigDecimal, like {m:myBigDecimal.setScale(2)}, but this results in Couldn't find the 'setScale(java.math.BigDecimal,java.lang.Integer)' service.
Is there a way to use this method (and ideally generally other methods as well) without creating a dedicated M2Doc service for this?
Thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
