formatClass = forName ("java.util.Date");
formatClass = java.util.Date.class;
  void setLocale (Locale loc)    {      if (type == null)	;      else if (type.equals("number"))	{	  // FIXME: named class literal.	  // formatClass = Number.class;	  formatClass = forName ("java.lang.Number");	  if (style == null)	    format = NumberFormat.getInstance(loc);	  else if (style.equals("currency"))	    format = NumberFormat.getCurrencyInstance(loc);	  else if (style.equals("percent"))	    format = NumberFormat.getPercentInstance(loc);	  else if (style.equals("integer"))	    {	      NumberFormat nf = NumberFormat.getNumberInstance(loc);	      nf.setMaximumFractionDigits(0);	      nf.setGroupingUsed(false);	      format = nf;	    }	  else	    {	      format = NumberFormat.getNumberInstance(loc);	      DecimalFormat df = (DecimalFormat) format;	      try		{		  df.applyPattern(style);		}	      catch (ParseException x)		{		  throw new IllegalArgumentException (x.getMessage());		}	    }	}      else if (type.equals("time") || type.equals("date"))	{	  // FIXME: named class literal.	  // formatClass = Date.class;	  formatClass = forName ("java.util.Date");	  int val = DateFormat.DEFAULT;	  if (style == null)	    ;	  if (style.equals("short"))	    val = DateFormat.SHORT;	  else if (style.equals("medium"))	    val = DateFormat.MEDIUM;	  else if (style.equals("long"))	    val = DateFormat.LONG;	  else if (style.equals("full"))	    val = DateFormat.FULL;	  if (type.equals("time"))	    format = DateFormat.getTimeInstance(val, loc);	  else	    format = DateFormat.getDateInstance(val, loc);	  if (style != null && val == DateFormat.DEFAULT)	    {	      SimpleDateFormat sdf = (SimpleDateFormat) format;	      sdf.applyPattern(style);	    }	}      else if (type.equals("choice"))	{	  // FIXME: named class literal.	  // formatClass = Number.class;	  formatClass = forName ("java.lang.Number");	  if (style == null)	    throw new	      IllegalArgumentException ("style required for choice format");	  format = new ChoiceFormat (style);	}    }