private Object getValuePopulatedWithTags ( final String originalTag , final String stringValue ) { // See if the value is a surrogate key in the tag parser's map that was placed there during preprocessing, // and if so, unpack the values retrieved via the key and use those to populate the field final Object value = constructFromString ( stringValue , getLongName ( ) ) ; if ( TaggedArgument . class . isAssignableFrom ( getUnderlyingFieldClass ( ) ) ) { // NOTE: this propagates the tag name/attributes to the field BEFORE the value is set TaggedArgument taggedArgument = ( TaggedArgument ) value ; TaggedArgumentParser . populateArgumentTags ( taggedArgument , getLongName ( ) , originalTag ) ; } else if ( originalTag != null ) { // a tag was found for a non-taggable argument throw new CommandLineException ( String . format ( "The argument: \"%s/%s\" does not accept tags: \"%s\"" , getShortName ( ) , getFullName ( ) , originalTag ) ) ; } return value ; }
populated with the actual value and tags and attributes provided by the user for that argument .