Reflectively get the priority from the @Priority annotation

@param converter
@return
197904
@Trivial
    private static int getPriority(Converter<?> converter) {
        int value = ConfigConstants.DEFAULT_CONVERTER_PRIORITY;
        //get Priority annotations from class only, not from the super-class
        Priority[] priorities = converter.getClass().getDeclaredAnnotationsByType(Priority.class);
        if (priorities != null && priorities.length > 0) {
            Priority priority = priorities[0];
            value = priority.value();
        }
        return value;
    }
1161984
public Object addColumn(Converter converter)
    {
        return converter.setupDefaultView(this.getNextLocation(ScreenConstants.NEXT_LOGICAL, ScreenConstants.SET_ANCHOR), this, ScreenConstants.DEFAULT_DISPLAY);
    }
1186900
private <A extends Annotation> AnnotationConverter<A> getConverter(Annotation annotation) {
		MappingOption mappingOption = annotation.annotationType().getAnnotation( MappingOption.class );
		if ( mappingOption == null ) {
			return null;
		}

		// wrong type would be a programming error of the annotation developer
		@SuppressWarnings("unchecked")
		Class<? extends AnnotationConverter<A>> converterClass = (Class<? extends AnnotationConverter<A>>) mappingOption.value();

		try {
			return converterClass.newInstance();
		}
		catch (Exception e) {
			throw log.cannotConvertAnnotation( converterClass, e );
		}
	}
1000105
public Converter getFieldConverter()
    {
        for (int i = 0; ; i++)
        {
            Object ojbComponent = this.getField().getComponent(i);
            if (ojbComponent == null)
                break;
            if (ojbComponent instanceof ScreenComponent)
            {
                Converter conv = (Converter)((ScreenComponent)ojbComponent).getConverter();
                if ((conv != null) && (conv.getField() == this.getField()))
                    return conv;   // Since there is a converter in front of this field, return the converter
            }
        }
        return this;
    }
479765
@Override
    public Converter getConverter(Class<?> valueType) {
        ConverterProvider provider = findProvider(valueType);
        if (provider == null) {
            return null;
        }
        return provider.createConverter(valueType);
    }
800066
public List<Converter<EntityMappings<T>>> getAllConverter()
   {
      List<Converter<EntityMappings<T>>> list = new ArrayList<Converter<EntityMappings<T>>>();
      List<Node> nodeList = childNode.get("converter");
      for(Node node: nodeList)
      {
         Converter<EntityMappings<T>>  type = new ConverterImpl<EntityMappings<T>>(this, "converter", childNode, node);
         list.add(type);
      }
      return list;
   }
478549
@Override
    public void addConverter(Class<?> from, Class<?> to, Converter converter) {
        Map toMap = fromMap.get(from);
        if (toMap == null) {
            toMap = new HashMap<Class<?>, Map<Class<?>, Converter>>();
            fromMap.put(from, toMap);
        }
        toMap.put(to, converter);
    }
297445
@SuppressWarnings("unchecked")
  public <S, D> ConditionalConverter<S, D> getFirstSupported(Class<?> sourceType,
      Class<?> destinationType) {
    ConditionalConverter<S, D> firstPartialMatchConverter = null;

    for (ConditionalConverter<?, ?> converter : converters) {
      MatchResult matchResult = converter.match(sourceType, destinationType);
      if (matchResult == MatchResult.FULL)
        return (ConditionalConverter<S, D>) converter;
      if (firstPartialMatchConverter == null
          && matchResult == MatchResult.PARTIAL)
        firstPartialMatchConverter = (ConditionalConverter<S, D>) converter;
    }
    return firstPartialMatchConverter;
  }
609335
public static <T> Function<Object, T> getConverter(final Class<T> clazz) {
      return object -> Convert.convert(object, clazz);
   }
51952
public static Converter converterFor( Class type )
    {
        if (!converters.containsKey( type ))
            throw new IllegalArgumentException( "Don't know type: " + type );

        return converters.get( type );
    }
708387
static ConverterFactory getConverterFactory(Configuration conf) {
    Class<? extends ConverterFactory> converterFactoryClass = conf.getClass(CONVERTER_FACTORY, null,
        ConverterFactory.class);
    if (converterFactoryClass == null) {
      throw new RuntimeException("ConverterFactory class was not set on the configuration");
    }
    LOG.debug("Got input ConverterFactory class from conf: {}", converterFactoryClass);
    return ReflectionUtils.newInstance(converterFactoryClass, conf);
  }
1225815
@Trivial
    public static <K> UserConverter<K> newInstance(Converter<K> converter) {
        return newInstance(getType(converter), converter);
    }
76841
public Converter getNextConverter()
    {
        BaseTable currentTable = m_MergeRecord.getTable().getCurrentTable();
        if (currentTable == null)
            return null;
        if (m_FieldSeq != -1)
        {
            if (m_strLinkedRecord == null)
                return currentTable.getRecord().getField(m_FieldSeq); // Get the current field
            else
                return currentTable.getRecord().getField(m_strLinkedRecord, m_FieldSeq);    // Get the current field
        }
        else
        {
            for (int index = 0; index < m_vArray.size(); index++)
            {
                InfoList infoList = (InfoList)m_vArray.elementAt(index);
                Record pQueryTable = currentTable.getRecord().getRecord(infoList.m_strFileName);
                if (pQueryTable != null)
                {
                    String strLinkFileName = infoList.m_strLinkFileName;
                    int iFieldSeq = infoList.m_iFieldSeq;
                    Converter field = infoList.m_converter;
                    if (field != null)
                        return field;
                    if (strLinkFileName != null)
                        return currentTable.getRecord().getField(strLinkFileName, iFieldSeq);
                    return pQueryTable.getField(iFieldSeq);
                }
            }
        }
        return null;
    }
960383
public static <T> Converter<T, T> identity()
	{
		@SuppressWarnings("unchecked")
		Converter<T, T> identity = (Converter<T, T>) IDENTITY;
		
		return identity;
	}
428000
protected ConversionExecutor getPropertyConversionExecutor() {
        if (conversionExecutor == null) {
            conversionExecutor = getConversionService().getConversionExecutor(Object[].class, getPropertyType());
        }
        return conversionExecutor;
    }
655707
public static <A, B, C, D> Converter<Example<A, B>, Example<C, D>> converter(
      Converter<A, C> inputConverter, Converter<B, D> outputConverter) {
    return new ExampleConverter<A, B, C, D>(inputConverter, outputConverter);
  }
35213
@Override
    public Converter getConverter(Class<?> from, Class<?> to) {
        Map<Class<?>, Converter> toMap = fromMap.get(from);
        if (toMap != null) {
            return toMap.get(to);
        } else {
            return null;
        }
    }