public ArrayList < String > serialize ( ) { ArrayList < String > params = new ArrayList <> ( ) ; for ( ParameterPair pair : parameters ) { params . add ( SerializedParameterization . OPTION_PREFIX + pair . option . toString ( ) ) ; if ( pair . value instanceof String ) { params . add ( ( String ) pair . value ) ; } else if ( pair . value instanceof Class ) { params . add ( ( ( Class < ? > ) pair . value ) . getCanonicalName ( ) ) ; } else { // Fallback: params . add ( pair . value . toString ( ) ) ; } } return params ; }
Serialize parameters .