public String render ( Message5WH msg ) { if ( msg != null ) { ST ret = this . stg . getInstanceOf ( "message5wh" ) ; if ( msg . getWhereLocation ( ) != null ) { ST where = this . stg . getInstanceOf ( "where" ) ; where . add ( "location" , msg . getWhereLocation ( ) ) ; if ( msg . getWhereLine ( ) > 0 ) { where . add ( "line" , msg . getWhereLine ( ) ) ; } if ( msg . getWhereColumn ( ) > 0 ) { where . add ( "column" , msg . getWhereColumn ( ) ) ; } ret . add ( "where" , where ) ; } ret . add ( "reporter" , msg . getReporter ( ) ) ; if ( msg . getType ( ) != null ) { Map < String , Boolean > typeMap = new HashMap <> ( ) ; typeMap . put ( msg . getType ( ) . toString ( ) , true ) ; ret . add ( "type" , typeMap ) ; } if ( msg . getWhat ( ) != null && ! StringUtils . isBlank ( msg . getWhat ( ) . toString ( ) ) ) { ret . add ( "what" , msg . getWhat ( ) ) ; } ret . add ( "who" , msg . getWho ( ) ) ; ret . add ( "when" , msg . getWhen ( ) ) ; ret . add ( "why" , msg . getWhy ( ) ) ; ret . add ( "how" , msg . getHow ( ) ) ; return ret . render ( ) ; } return "" ; }
Renders a single message