final AttributeList attList = new AttributeList(); attList.setAttribute( namespaceUri, "name", propertyName ); if ( BeanUtility.isSameType( propertyType, property.getClass() ) == false ) { attList.setAttribute( namespaceUri, "class", property.getClass().getName() );
public void writeExpressionParameter( final XmlWriter writer, final BeanUtility beanUtility, final String propertyName, final String namespaceUri ) throws IOException, BeanException { // filter some of the standard properties. These are system-properties // and are set elsewhere final Object property = beanUtility.getProperty( propertyName ); final Class propertyType = beanUtility.getPropertyType( propertyName ); final String value = beanUtility.getPropertyAsString( propertyName ); if ( value != null && property != null ) { final AttributeList attList = new AttributeList(); attList.setAttribute( namespaceUri, "name", propertyName ); if ( BeanUtility.isSameType( propertyType, property.getClass() ) == false ) { attList.setAttribute( namespaceUri, "class", property.getClass().getName() ); } writer.writeTag( namespaceUri, "property", attList, XmlWriterSupport.OPEN ); writer.writeTextNormalized( value, false ); writer.writeCloseTag(); } }
private void writePreProcessor( final XmlWriter writer, final ReportPreProcessor preProcessor ) throws IntrospectionException, BeanException, IOException { if ( writer == null ) { throw new NullPointerException(); } if ( preProcessor == null ) { throw new NullPointerException(); } // the classic way, in case the expression does not provide any meta-data. This is // in the code for legacy reasons, as there are many expression implementations out there // that do not yet provide meta-data descriptions .. final BeanUtility beanUtility = new BeanUtility( preProcessor ); final String[] propertyNames = beanUtility.getProperties(); for ( int i = 0; i < propertyNames.length; i++ ) { final String key = propertyNames[i]; final Object property = beanUtility.getProperty( key ); final Class propertyType = beanUtility.getPropertyType( key ); final String value = beanUtility.getPropertyAsString( key ); if ( value != null && property != null ) { final AttributeList attList = new AttributeList(); attList.setAttribute( BundleNamespaces.LAYOUT, "name", key ); if ( BeanUtility.isSameType( propertyType, property.getClass() ) == false ) { attList.setAttribute( BundleNamespaces.LAYOUT, "class", property.getClass().getName() ); } writer.writeTag( BundleNamespaces.LAYOUT, "property", attList, XmlWriterSupport.OPEN ); writer.writeTextNormalized( value, false ); writer.writeCloseTag(); } } }
final AttributeList attList = new AttributeList(); attList.setAttribute( ExtParserModule.NAMESPACE, "name", key ); if ( BeanUtility.isSameType( propertyType, property.getClass() ) == false ) { attList.setAttribute( ExtParserModule.NAMESPACE, "class", property.getClass().getName() );
final AttributeList attList = new AttributeList(); attList.setAttribute( namespaceUri, "name", propertyName ); if ( BeanUtility.isSameType( propertyType, property.getClass() ) == false ) { attList.setAttribute( namespaceUri, "class", property.getClass().getName() );