Get the string value

@param formatter
the CCS target
@return the value
199338
String stringValue( CssFormatter formatter ) {
        String str;
        try {
            formatter.addOutput();
            appendTo( formatter );
        } catch( Exception ex ) {
            throw createException( ex );
        } finally {
            str = formatter.releaseOutput();
        }
        return str;
    }
227446
private Object getFormatter() {
        Object f = iFormatter;

        if (f == null) {
            if (iElementPairs.size() == 2) {
                Object printer = iElementPairs.get(0);
                Object parser = iElementPairs.get(1);

                if (printer != null) {
                    if (printer == parser || parser == null) {
                        f = printer;
                    }
                } else {
                    f = parser;
                }
            }

            if (f == null) {
                f = new Composite(iElementPairs);
            }

            iFormatter = f;
        }

        return f;
    }
843295
def get_formatter(name):
    
    for k in sorted(_FORMATTERS):
        if k.startswith(name):
            return _FORMATTERS[k]
821401
@SuppressWarnings("unchecked")
    public TextFormatter<T> getFormatter(final FieldAccessor field, final Configuration config) {

        if(field.hasAnnotation(CsvFormat.class)) {
            CsvFormat formatAnno = field.getAnnotation(CsvFormat.class).get();

            final TextFormatter<T> formatter = (TextFormatter<T>) config.getBeanFactory().create(formatAnno.formatter());
            if(!formatAnno.message().isEmpty()) {
                formatter.setValidationMessage(formatAnno.message());
            }
            return formatter;

        } else {
            return getDefaultFormatter(field, config);

        }
    }
500688
public static String getConvertedStringValue(FacesContext context,
            UIComponent component, Converter converter, Object value)
    {
        if (converter == null)
        {
            if (value == null)
            {
                return "";
            }
            else if (value instanceof String)
            {
                return (String) value;
            }
            else
            {
                return value.toString();
            }
        }

        return converter.getAsString(context, component, value);
    }
88552
def wrap_formatter(formatter):
    
    if isinstance(formatter, ticker.Formatter):
        return formatter
    elif callable(formatter):
        args = [arg for arg in _getargspec(formatter).args
                if arg != 'self']
        wrapped = formatter
        if len(args) == 1:
            def wrapped(val, pos=None):
                return formatter(val)
        return ticker.FuncFormatter(wrapped)
    elif isinstance(formatter, basestring):
        if re.findall(r"\{(\w+)\}", formatter):
            return ticker.StrMethodFormatter(formatter)
        else:
            return ticker.FormatStrFormatter(formatter)
182076
public static Format getFormat(String className) {
		assert className != null;
		if (className.isEmpty()) {
			return null;
		}

		ThreadLocal<Format> tlsFormatter = classFormatters.get(className);
		if (tlsFormatter == null) {
			try {
				// append formatter class name to cache only if exists and is of right type
				Classes.forName(className);
				tlsFormatter = new ThreadLocal<Format>();
				classFormatters.put(className, tlsFormatter);
			} catch (NoSuchBeingException e) {
				log.error("Formatter class |%s| not found.", className);
				return null;
			} catch (ClassCastException e) {
				log.error("Invalid formatter class |%s|. It should inherit from |%s|.", className, Format.class);
				return null;
			}
		}

		Format formatter = tlsFormatter.get();
		if (formatter == null) {
			formatter = createFormatter(className);
			if (formatter == null) {
				// formatter can be invalid only if miss proper constructor and this is for sure a flaw in logic
				throw new BugError("Invalid formatter class |%s|. Proper constructor not found.", className);
			}
			tlsFormatter.set(formatter);
		}
		return formatter;
	}
1201134
def get_formatter_by_name(_alias, **options):
    
    cls = find_formatter_class(_alias)
    if cls is None:
        raise ClassNotFound("no formatter found for name %r" % _alias)
    return cls(**options)
400430
public String getString() 
    {
        String string = Constants.BLANK;
        if (this.getNextConverter().getData() != null)
        {
            double doubleValue = this.getValue();
            synchronized (gPercentFormat)
            {
                string = gPercentFormat.format(doubleValue);
            }
        }
        return string;
    }
76692
private Expression extract( CssFormatter formatter ) {
        List<Expression> exList = getParamList( formatter );
        int idx = getInt( 1, formatter );
        if( idx <= 0 || exList.size() < idx ) {
            type = STRING;
            return null;
        }
        Expression ex = exList.get( idx - 1 );
        type = ex.getDataType( formatter );
        switch( type ) {
            case STRING:
            case LIST:
                break;
            default:
                doubleValue = ex.doubleValue( formatter );
        }
        return ex;

    }
522271
def _get_formatter(self, json):
        '''
        
        '''
        if json:
            return jsonlogger.JsonFormatter()
        else:
            return logging.Formatter(self.format_string)
1054446
protected Object doParseValue(String formattedString, Class targetClass) throws ParseException {
		return dateFormat.parse(formattedString);
	}
331023
def format(self, formatter, *args, **kwargs):
        
        # TODO: data export?
        return self.get_formatter(formatter)(*args, **kwargs)
553615
private List<Expression> getParamList( CssFormatter formatter ) {
        Expression ex0 = get( 0 ).unpack( formatter );
        if( ex0.getDataType( formatter ) == LIST ) {
            Operation op = ex0.listValue( formatter );
            List<Expression> operants = op.getOperands();
            if( operants.size() == 1 ) {
                Expression ex0_0 = operants.get( 0 );
                if( ex0_0.getDataType( formatter ) == LIST ) {
                    return ex0_0.listValue( formatter ).getOperands();
                }
            }
            return operants;
        }
        List<Expression> result = new ArrayList<Expression>();
        result.add( ex0 );
        return result;
    }
1289929
static String replacePlaceHolder( CssFormatter formatter, String str, LessObject caller ) {
        int pos = str.startsWith( "@{" ) ? 0 : str.indexOf( "@", 1 );
        if( pos >= 0 ) {
            formatter.addOutput();
            SelectorUtils.appendToWithPlaceHolder( formatter, str, pos, false, caller );
            return formatter.releaseOutput();
        }
        return str;
    }
921450
public FormatSettingsManager getFormatSettingsManager() {
        if (formatSettingsManager != null) {
            return formatSettingsManager;
        }
        formatSettingsManager = (FormatSettingsManager) ContainerManager.getComponent("formatSettingsManager");
        return formatSettingsManager;
    }
122114
def formatValue( self, value ):
        
        formatter = self.formatter()
        if ( formatter is not None ):
            return formatter(value)
        
        elif ( self.format() ):
            rtype = self.rulerType()
            if ( rtype in (XChartRuler.Type.Date, XChartRuler.Type.Datetime,
                           XChartRuler.Type.Time) ):
                return value.toString(self.format())
            else:
                try:
                    return self.format() % value
                except TypeError:
                    return nativestring(value)
        
        return nativestring(value)