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