Finds the appropriate converter for a given value holder

@param fc
FacesContext instance
@param vh
ValueHolder instance to look converter for
@return Converter
358089
public static Converter getConverter(FacesContext fc, ValueHolder vh) {
		// explicit converter
		Converter converter = vh.getConverter();

		// try to find implicit converter
		if (converter == null) {
			ValueExpression expr = ((UIComponent) vh).getValueExpression("value");
			if (expr != null) {
				Class<?> valueType = expr.getType(fc.getELContext());
				if (valueType != null) {
					converter = fc.getApplication().createConverter(valueType);
				}
			}
		}

		return converter;
	}
1255611
public PriorityConverter getConverter(Type type) {
        PriorityConverter converter = converters.get(type);
        return converter;
    }
1317471
protected Converter createConverter(FaceletContext ctx) throws FacesException, ELException, FaceletException
    {
        return ctx.getFacesContext().getApplication().createConverter(NumberConverter.CONVERTER_ID);
    }
798395
public static void decodeUISelectBoolean(FacesContext facesContext, UIComponent component)
    {
        if (!(component instanceof EditableValueHolder))
        {
            throw new IllegalArgumentException("Component "
                    + component.getClientId(facesContext)
                    + " is not an EditableValueHolder");
        }
        if (isDisabledOrReadOnly(component))
        {
            return;
        }
        Map paramMap = facesContext.getExternalContext()
                .getRequestParameterMap();
        String clientId = component.getClientId(facesContext);
        if (paramMap.containsKey(clientId))
        {
            String reqValue = (String) paramMap.get(clientId);
            if ((reqValue.equalsIgnoreCase("on")
                    || reqValue.equalsIgnoreCase("yes") || reqValue
                    .equalsIgnoreCase("true")))
            {
                ((EditableValueHolder) component).setSubmittedValue(Boolean.TRUE);
            }
            else
            {
                ((EditableValueHolder) component).setSubmittedValue(Boolean.FALSE);
            }
        }
        else
        {
            ((EditableValueHolder) component).setSubmittedValue(Boolean.FALSE);
        }
    }
1298735
protected ExternalStylesheetDescriptor convert(IStylesheetDescriptor stylesheetDescriptor) {
        final ExternalStylesheetDescriptor externalStylesheetDescriptor =
                new ExternalStylesheetDescriptor();

        externalStylesheetDescriptor.setName(stylesheetDescriptor.getName());
        externalStylesheetDescriptor.setUrlSyntaxHelper(
                stylesheetDescriptor.getUrlNodeSyntaxHelperName());
        externalStylesheetDescriptor.setDescription(stylesheetDescriptor.getDescription());
        externalStylesheetDescriptor.setUri(stylesheetDescriptor.getStylesheetResource());

        final Collection<IOutputPropertyDescriptor> outputPropertyDescriptors =
                stylesheetDescriptor.getOutputPropertyDescriptors();
        final List<ExternalOutputPropertyDescriptor> extOutputPropertyDescriptors =
                externalStylesheetDescriptor.getOutputProperties();
        for (final IOutputPropertyDescriptor outputPropertyDescriptor : outputPropertyDescriptors) {
            final ExternalOutputPropertyDescriptor extOutputPropertyDescriptor =
                    new ExternalOutputPropertyDescriptor();
            copyProperties(outputPropertyDescriptor, extOutputPropertyDescriptor);
            extOutputPropertyDescriptors.add(extOutputPropertyDescriptor);
        }
        Collections.sort(
                extOutputPropertyDescriptors, ExternalStylesheetDataNameComparator.INSTANCE);

        final Collection<IStylesheetParameterDescriptor> stylesheetParameterDescriptors =
                stylesheetDescriptor.getStylesheetParameterDescriptors();
        final List<ExternalStylesheetParameterDescriptor> extStylesheetParameterDescriptors =
                externalStylesheetDescriptor.getStylesheetParameters();
        for (final IStylesheetParameterDescriptor stylesheetParameterDescriptor :
                stylesheetParameterDescriptors) {
            final ExternalStylesheetParameterDescriptor extStylesheetParameterDescriptor =
                    new ExternalStylesheetParameterDescriptor();
            copyProperties(stylesheetParameterDescriptor, extStylesheetParameterDescriptor);
            extStylesheetParameterDescriptors.add(extStylesheetParameterDescriptor);
        }
        Collections.sort(
                extStylesheetParameterDescriptors, ExternalStylesheetDataNameComparator.INSTANCE);

        final Collection<ILayoutAttributeDescriptor> layoutAttributeDescriptors =
                stylesheetDescriptor.getLayoutAttributeDescriptors();
        final List<ExternalLayoutAttributeDescriptor> extLayoutAttributeDescriptors =
                externalStylesheetDescriptor.getLayoutAttributes();
        for (final ILayoutAttributeDescriptor layoutAttributeDescriptor :
                layoutAttributeDescriptors) {
            final ExternalLayoutAttributeDescriptor extLayoutAttributeDescriptor =
                    new ExternalLayoutAttributeDescriptor();
            copyProperties(layoutAttributeDescriptor, extLayoutAttributeDescriptor);
            extLayoutAttributeDescriptor
                    .getTargetElements()
                    .addAll(layoutAttributeDescriptor.getTargetElementNames());
            extLayoutAttributeDescriptors.add(extLayoutAttributeDescriptor);
        }
        Collections.sort(
                extLayoutAttributeDescriptors, ExternalStylesheetDataNameComparator.INSTANCE);

        return externalStylesheetDescriptor;
    }
1230242
@Override
	public ResultURIConverter getContextConverter(String flags) {
		if (flags == null) {
			return converter;
		}
		return new ArchivalUrlSpecialContextResultURIConverter(flags);
	}
1273225
protected Converter createConverter(FaceletContext ctx)
    {
        if (_delegate.getConverterId(ctx) == null)
        {
            throw new TagException(_delegate.getTag(),
                                    "Default behavior invoked of requiring a converter-id passed in the "
                                    + "constructor, must override ConvertHandler(ConverterConfig)");
        }
        return ctx.getFacesContext().getApplication().createConverter(_delegate.getConverterId(ctx));
    }
188723
protected final CnvTfsObject
    lazyGetCnvTfsObject(final Class pClass) throws Exception {
    String beanName = getCnvTfsObjectName(pClass);
    @SuppressWarnings("unchecked")
    CnvTfsObject<Object> convrt = (CnvTfsObject<Object>)
      this.convertersMap.get(beanName);
    if (convrt == null) {
      convrt = new CnvTfsObject<Object>();
      convrt.setUtlReflection(getUtlReflection());
      convrt.setFieldsConvertersFatory(this);
      convrt.setFieldConverterNamesHolder(this.fieldConverterNamesHolder);
      convrt.setGettersRapiHolder(this.gettersRapiHolder);
      convrt.setSettersRapiHolder(this.settersRapiHolder);
      convrt.init(pClass);
      this.convertersMap.put(beanName, convrt);
    }
    return convrt;
  }
479765
@Override
    public Converter getConverter(Class<?> valueType) {
        ConverterProvider provider = findProvider(valueType);
        if (provider == null) {
            return null;
        }
        return provider.createConverter(valueType);
    }
872585
@SuppressWarnings("unchecked")
	public <T> Converter<T> getCustomConverter(Type type) {
		return (null == customConverterMap) ? null : (Converter<T>) customConverterMap.get(type);
	}
447923
@SuppressWarnings("unchecked")
    protected BindingResult<T> doBind(
        ArgumentConversionContext<T> context,
        ConvertibleValues<?> values,
        String annotationValue) {

        return doConvert(doResolve(context, values, annotationValue), context);
    }
910989
public static Converter findUISelectManyConverter(
            FacesContext facesContext, UISelectMany component)
    {
        return findUISelectManyConverter(facesContext, component, false);
    }
742439
@SuppressWarnings("unchecked")
    private <T> TypedStringConverter<T> findAnyConverter(final Class<T> cls) {
        // check factories
        for (StringConverterFactory factory : factories) {
            StringConverter<T> factoryConv = (StringConverter<T>) factory.findConverter(cls);
            if (factoryConv != null) {
                return TypedAdapter.adapt(cls, factoryConv);
            }
        }
        return null;
    }
872292
@Override
    public Object getValue(final Object base, final Object property) throws EvaluationException,
        PropertyNotFoundException
    {
        if (base == null)
        {
            return null;
        }
        if (property == null)
        {
            return null;
        }
        return invokeResolver(new ResolverInvoker<Object>(base, property)
        {
            @Override
            public Object invoke(ELResolver resolver, ELContext context)
            {
                return getELResolver().getValue(getELContext(), base, property);
            }
        });
    }
1100472
private Object[] convert(FieldConversion[] fcs, Object[] values)
    {
        Object[] convertedValues = new Object[values.length];
        
        for (int i= 0; i < values.length; i++)
        {
            convertedValues[i] = fcs[i].sqlToJava(values[i]);
        }

        return convertedValues;
    }
304178
@CheckResult @NonNull public <T> Preference<T> getObject(@NonNull String key,
      @NonNull T defaultValue, @NonNull Preference.Converter<T> converter) {
    checkNotNull(key, "key == null");
    checkNotNull(defaultValue, "defaultValue == null");
    checkNotNull(converter, "converter == null");
    return new RealPreference<>(preferences, key, defaultValue,
        new ConverterAdapter<>(converter), keyChanges);
  }
330139
public VMTransitionBuilder getBuilder(VMState srcState, VMState dstState) {
        Map<VMState, VMTransitionBuilder> dstCompliant = vmAMB2.get(dstState);
        if (dstCompliant == null) {
            return null;
        }
        return dstCompliant.get(srcState);
    }