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