(STWriter out, InstanceScope scope, Object o, String[] options)
| 734 | } |
| 735 | |
| 736 | protected int writePOJO(STWriter out, InstanceScope scope, Object o, String[] options) throws IOException { |
| 737 | String formatString = null; |
| 738 | if ( options!=null ) formatString = options[Option.FORMAT.ordinal()]; |
| 739 | // ask the native group defining the surrounding template for the renderer |
| 740 | AttributeRenderer r = scope.st.impl.nativeGroup.getAttributeRenderer(o.getClass()); |
| 741 | String v; |
| 742 | if ( r!=null ) v = r.toString(o, formatString, locale); |
| 743 | else v = o.toString(); |
| 744 | int n; |
| 745 | if ( options!=null && options[Option.WRAP.ordinal()] !=null ) { |
| 746 | n = out.write(v, options[Option.WRAP.ordinal()]); |
| 747 | } |
| 748 | else { |
| 749 | n = out.write(v); |
| 750 | } |
| 751 | return n; |
| 752 | } |
| 753 | |
| 754 | protected int getExprStartChar(InstanceScope scope) { |
| 755 | Interval templateLocation = scope.st.impl.sourceMap[scope.ip]; |
no test coverage detected