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