public static Object conv( final Class type, final Attribute attr,  final Localizer localizer ) throws NoSuchFieldException, IllegalAccessException {
    Object obj = null;
    if ( Parser.LOCALIZED_ATTRIBUTES.contains( attr.getName().toLowerCase() ))
        attr.setValue( localizer.getString( attr.getValue() ));

    try {
      if (boolean.class.equals( type )) {
        obj = Boolean.valueOf(attr.getValue());
      } else if (int.class.equals( type )) {
        obj = Integer.valueOf( attr.getValue() );
      } else if (long.class.equals( type )) {
        obj = Long.valueOf( attr.getValue() );
      } else if (float.class.equals( type )) {
        obj = Float.valueOf( attr.getValue() );
      } else if (double.class.equals( type )) {
        obj = Double.valueOf( attr.getValue() );
      }
    } catch (Exception e) { 
      // intent. empty
    } finally {
      if (obj==null) {
        try {
          String s = attr.getValue();
          int k = s.indexOf( '.' );
          Class pp = dictionaries.get( s.substring( 0, k ) );
          obj = pp.getField( s.substring( k + 1 ) ).get( pp );
        } catch (Exception ex) {
          //
          //  Try to find the given value as a Constant in SwingConstants
          //
          obj = PrimitiveConverter.class.getField( attr.getValue() ).get( PrimitiveConverter.class );
        }
      }
    }

    return obj;
  }