private Object parseObjectString ( Class < ? > objectType , final String objectString ) { Object res ; if ( ResourceParams . class . isAssignableFrom ( objectType ) ) { // Setup the default object if ( this . object instanceof List < ? > ) { ResourceParams rp = ( ResourceParams ) ( ( List < ? > ) this . object ) . get ( 0 ) ; try { rp = ( ResourceParams ) rp . clone ( ) ; rp . parse ( objectString . split ( PARAMETER_SEPARATOR_REGEX ) ) ; rp . getKey ( ) ; } catch ( final CloneNotSupportedException e ) { } res = rp ; } else { ( ( ResourceParams ) this . object ) . parse ( objectString . split ( PARAMETER_SEPARATOR_REGEX ) ) ; // return the new value res = this . object ; } } else if ( Class . class . isAssignableFrom ( objectType ) ) { res = parseClassParameter ( objectString ) ; } else if ( Enum . class . isAssignableFrom ( objectType ) ) { res = parseEnumParameter ( ( Enum < ? > ) this . object , objectString ) ; } else if ( File . class . isAssignableFrom ( objectType ) ) { res = parseFileParameter ( objectString ) ; } else if ( List . class . isAssignableFrom ( objectType ) ) { res = parseListParameter ( objectString ) ; } else { res = parsePrimitive ( objectType , objectString ) ; } return res ; }
Parse a string representation of an object .