out.println("  private final static PropertyDescriptor properties[] = new PropertyDescriptor["+(l+cc)+"];");
println(out,"  private final static PropertyDescriptor properties[] = new PropertyDescriptor["+(l+cc)+"];");
    void writeBeanInfoBody( PrintWriter out, String context, String className ) {            Vector slotspecs = getAllSlotSpecs(context);      // Add in time phased slots      if (p.get(context, PGParser.TIMEPHASED) != null) {        slotspecs.addElement("long start_time");        slotspecs.addElement("long end_time");      }      // figure out how many property slots we need      int l = 0;                // props      int asc = 0;              // methods      int cc = 0;               // collections (not used)      Enumeration se = slotspecs.elements();      while (se.hasMoreElements()) {        String slotspec = ((String)se.nextElement()).trim();        int s = slotspec.indexOf(" ");        String type = slotspec.substring(0,s);        String name = slotspec.substring(s+1);        ActiveSlot as = parseActiveSlot(slotspec);        // count the different slot types        if (as == null) {                   CollectionType ct = parseCollectionType(type);          if (ct != null) {            cc++;          } else {            l++;          }        } else {          asc++;        }      }              out.println("  private final static PropertyDescriptor properties[] = new PropertyDescriptor["+(l+cc)+"];");      if ((l+cc)>0) {        out.println("  static {");        out.println("    try {");        int i = 0;        se = slotspecs.elements();        while (se.hasMoreElements()) {          String slotspec = ((String)se.nextElement()).trim();          int s = slotspec.indexOf(" ");          String type = slotspec.substring(0,s);          String name = slotspec.substring(s+1);          ActiveSlot as = parseActiveSlot(slotspec);          if (as != null) {            name = as.name;          }          String etype = null;          CollectionType ct = parseCollectionType(type);          if (ct != null) {            type = ct.ctype;            etype = ct.etype;          }          String clname = toClassName(context);          if (as == null) {            // non-active slots            if (ct == null) {              // plain slots              out.println("      properties["+i+"]= new PropertyDescriptor(\""+                          name+"\", "+                          clname+".class, "+                          "\"get"+toClassName(name)+"\", null);");            } else {              // collection slots              out.println("      properties["+i+"]= new IndexedPropertyDescriptor(\""+                          name+"\", "+                          clname+".class, "+                          "\"get"+toClassName(name)+"AsArray\", null, "+                          "\"getIndexed"+toClassName(name)+"\", null);");            }            i++;          }        }        out.println("    } catch (Exception e) { System.err.println(\"Caught: \"+e); e.printStackTrace(); }");        out.println("  };");      }      out.println();      out.println("  public PropertyDescriptor[] getPropertyDescriptors() {");      out.println("    return properties;");      out.println("  }");    }