(STWriter out, InstanceScope scope, Object o, String[] options)
| 758 | } |
| 759 | |
| 760 | protected int writePOJO(STWriter out, InstanceScope scope, Object o, String[] options) throws IOException { |
| 761 | String formatString = null; |
| 762 | if ( options !=null ) formatString = options[Option.FORMAT.ordinal()]; |
| 763 | // ask the native group defining the surrounding template for the renderer |
| 764 | AttributeRenderer r = scope.st.impl.nativeGroup.getAttributeRenderer(o.getClass()); |
| 765 | String v; |
| 766 | if ( r !=null ) v = r.toString(o, formatString, locale); |
| 767 | else v = o.toString(); |
| 768 | int n; |
| 769 | if ( options !=null && options[Option.WRAP.ordinal()] !=null ) { |
| 770 | n = out.write(v, options[Option.WRAP.ordinal()]); |
| 771 | } |
| 772 | else { |
| 773 | n = out.write(v); |
| 774 | } |
| 775 | return n; |
| 776 | } |
| 777 | |
| 778 | protected int getExprStartChar(InstanceScope scope) { |
| 779 | Interval templateLocation = scope.st.impl.sourceMap[scope.ip]; |
no test coverage detected