public static Object populateValue ( Object valObj , Class clazz ) { if ( isUTF8Value ( clazz ) || clazz . isEnum ( ) ) { return valObj . toString ( ) ; } else if ( ( valObj instanceof Calendar ) || ( valObj instanceof GregorianCalendar ) ) { return ( ( Calendar ) valObj ) . getTime ( ) ; } else if ( CollectionExpression . class . isAssignableFrom ( clazz ) ) { CollectionExpression collExpr = ( CollectionExpression ) valObj ; List < String > texts = new ArrayList < String > ( collExpr . childrenSize ( ) ) ; for ( Expression childExpr : collExpr . orderedChildren ( ) ) { if ( childExpr instanceof StringLiteral ) { StringLiteral stringLiteral = ( StringLiteral ) childExpr ; texts . add ( stringLiteral . getUnquotedText ( ) ) ; } } return texts ; } return valObj ; }
Populate value .