org.eclipse.pde.api.tools_1.0.301.v20111129-2053

/   272: invokestatic 436	java/util/Collections:sort	(Ljava/util/List;Ljava/util/Comparator;)V
    //   275: aconst_null
    //   276: astore 9
    //   278: aconst_null
    //   279: astore 10
    //   281: aconst_null
    //   282: astore 11
    //   284: aconst_null
    //   285: astore 12
    //   287: aload 8
    //   289: invokeinterface 477 1 0
    //   294: astore 13
    //   296: goto +135 -> 431
    //   299: aload_2
    //   300: getfield 395	org/eclipse/pde/api/tools/internal/search/ConsumerReportConvertor$Producer:types	Ljava/util/Map;
    //   303: aload 13
    //   305: invokeinterface 473 1 0
    //   310: invokeinterface 479 2 0
    //   315: checkcast 228	org/eclipse/pde/api/tools/internal/search/ConsumerReportConvertor$Type2
    //   318: astore 12
    //   320: aload 12
    //   322: getfield 399	org/eclipse/pde/api/tools/internal/search/ConsumerReportConvertor$Type2:counts	Lorg/eclipse/pde/api/tools/internal/search/UseReportConverter$CountGroup;
    //   325: astore 9
    //   327: aload 12
    //   329: getfield 398	org/eclipse/pde/api/tools/internal/search/ConsumerReportConvertor$Type2:desc	Lorg/eclipse/pde/api/tools/internal/provisional/descriptors/IElementDescriptor;
    //   332: checkcast 221	org/eclipse/pde/api/tools/internal/provisional/descriptors/IReferenceTypeDescriptor
    //   335: invokestatic 471	org/eclipse/pde/api/tools/internal/util/Signatures:getQualifiedTypeSignature	(Lorg/eclipse/pde/api/tools/internal/provisional/descriptors/IReferenceTypeDescriptor;)Ljava/lang/String;
    //   338: astore 14
    //   340: new 202	java/io/File
    //   343: dup
    //   344: aload 5
    //   346: new 209	java/lang/StringBuffer
    //   349: dup
    //   350: aload 14
    //   352: invokestatic 430	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
    //   355: invokespecial 433	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   358: ldc_w 193
    //   361: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   364: invokevirtual 432	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   367: invokespecial 419	java/io/File:<init>	(Ljava/io/File;Ljava/lang/String;)V
    //   370: astore 11
    //   372: aload 11
    //   374: invokevirtual 416	java/io/File:exists	()Z
    //   377: ifne +9 -> 386
    //   380: aload 11
    //   382: invokevirtual 415	java/io/File:createNewFile	()Z
    //   385: pop
    //   386: aload_0
    //   387: aload 5
    //   389: aload 11
    //   391: invokevirtual 418	java/io/File:getAbsolutePath	()Ljava/lang/String;
    //   394: invokevirtual 459	org/eclipse/pde/api/tools/internal/search/ConsumerReportConvertor:extractLinkFrom	(Ljava/io/File;Ljava/lang/String;)Ljava/lang/String;
    //   397: astore 10
    //   399: aload 6
    //   401: aload_0
    //   402: aload 9
    //   404: aload 10
    //   406: aload 14
    //   408: iconst_0
    //   409: invokevirtual 463	org/eclipse/pde/api/tools/internal/search/ConsumerReportConvertor:getReferenceTableEntry	(Lorg/eclipse/pde/api/tools/internal/search/UseReportConverter$CountGroup;Ljava/lang/String;Ljava/lang/String;Z)Ljava/lang/String;
    //   412: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   415: pop
    //   416: aload_0
    //   417: aload 12
    //   419: getfield 397	org/eclipse/pde/api/tools/internal/search/ConsumerReportConvertor$Type2:referencingMembers	Ljava/util/Map;
    //   422: aload 12
    //   424: aload 11
    //   426: aload 14
    //   428: invokevirtual 462	org/eclipse/pde/api/tools/internal/search/ConsumerReportConvertor:writeTypePage	(Ljava/util/Map;Lorg/eclipse/pde/api/tools/internal/search/UseReportConverter$Type;Ljava/io/File;Ljava/lang/String;)V
    //   431: aload 13
    //   433: invokeinterface 472 1 0
    //   438: ifne -139 -> 299
    //   441: aload 6
    //   443: ldc_w 197
    //   446: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   449: pop
    //   450: aload 6
    //   452: ldc_w 199
    //   455: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   458: pop
    //   459: aload 6
    //   461: ldc 17
    //   463: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   466: ldc_w 198
    //   469: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   472: getstatic 400	org/eclipse/pde/api/tools/internal/search/SearchMessages:ConsumerReportConvertor_BackLinkToConsumer	Ljava/lang/String;
    //   475: aload_1
    //   476: getfield 390	org/eclipse/pde/api/tools/internal/search/ConsumerReportConvertor$Consumer:name	Ljava/lang/String;
    //   479: invokestatic 441	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
    //   482: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   485: ldc_w 194
    //   488: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   491: ldc 8
    //   493: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   496: pop
    //   497: aload 6
    //   499: ldc_w 200
    //   502: invokevirtual 434	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   505: pop
    //   506: new 206	java/io/PrintWriter
    //   509: dup
    //   510: new 205	java/io/OutputStreamWriter
    //   513: dup
    //   514: new 203	java/io/FileOutputStream
    //   517: dup
    //   518: aload 4
    //   520: invokespecial 421	java/io/FileOutputStream:<init>	(Ljava/io/File;)V
    //   523: ldc_w 201
    //   526: invokespecial 422	java/io/OutputStreamWriter:<init>	(Ljava/io/OutputStream;Ljava/lang/String;)V
    //   529: invokespecial 425	java/io/PrintWriter:<init>	(Ljava/io/Writer;)V
    //   532: astore_3
    //   533: aload_3
    //   534: aload 6
    //   536: invokevirtual 432	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   539: invokevirtual 427	java/io/PrintWriter:println	(Ljava/lang/String;)V
    //   542: aload_3
    //   543: invokevirtual 424	java/io/PrintWriter:flush	()V
    //   546: goto +36 -> 582
    //   549: pop
    //   550: new 207	java/lang/Exception
    //   553: dup
    //   554: getstatic 414	org/eclipse/pde/api/tools/internal/search/SearchMessages:ioexception_writing_html_file	Ljava/lang/String;
    //   557: aload 4
    //   559: invokevirtual 418	java/io/File:getAbsolutePath	()Ljava/lang/String;
    //   562: invokestatic 441	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
    //   565: invokespecial 428	java/lang/Exception:<init>	(Ljava/lang/String;)V
    //   568: athrow
    //   569: astore 15
    //   571: aload_3
    //   572: ifnull +7 -> 579
    //   575: aload_3
    //   576: invokevirtual 423	java/io/PrintWriter:close	()V
    //   579: aload 15
    //   581: athrow
    //   582: aload_3
    //   583: ifnull +7 -> 590
    //   586: aload_3
    //   587: invokevirtual 423	java/io/PrintWriter:close	()V
    //   590: return
    // Line number table:
    //   Java source line #651	-> byte code offset #0
    //   Java source line #652	-> byte code offset #2
    //   Java source line #654	-> byte code offset #5
    //   Java source line #655	-> byte code offset #39
    //   Java source line #656	-> byte code offset #47
    //   Java source line #658	-> byte code offset #53
    //   Java source line #659	-> byte code offset #66
    //   Java source line #660	-> byte code offset #74
    //   Java source line #662	-> byte code offset #80
    //   Java source line #663	-> byte code offset #89
    //   Java source line #664	-> byte code offset #97
    //   Java source line #665	-> byte code offset #115
    //   Java source line #666	-> byte code offset #124
    //   Java source line #667	-> byte code offset #133
    //   Java source line #668	-> byte code offset #161
    //   Java source line #669	-> byte code offset #169
    //   Java source line #670	-> byte code offset #177
    //   Java source line #671	-> byte code offset #205
    //   Java source line #672	-> byte code offset #211
    //   Java source line #673	-> byte code offset #216
    //   Java source line #675	-> byte code offset #224
    //   Java source line #677	-> byte code offset #241
    //   Java source line #678	-> byte code offset #250
    //   Java source line #679	-> byte code offset #267
    //   Java source line #681	-> byte code offset #275
    //   Java source line #682	-> byte code offset #278
    //   Java source line #683	-> byte code offset #281
    //   Java source line #684	-> byte code offset #284
    //   Java source line #685	-> byte code offset #287
    //   Java source line #686	-> byte code offset #299
    //   Java source line #687	-> byte code offset #320
    //   Java source line #689	-> byte code offset #327
    //   Java source line #690	-> byte code offset #340
    //   Java source line #691	-> byte code offset #372
    //   Java source line #692	-> byte code offset #380
    //   Java source line #694	-> byte code offset #386
    //   Java source line #695	-> byte code offset #399
    //   Java source line #696	-> byte code offset #416
    //   Java source line #685	-> byte code offset #431
    //   Java source line #698	-> byte code offset #441
    //   Java source line #699	-> byte code offset #450
    //   Java source line #701	-> byte code offset #459
    //   Java source line #702	-> byte code offset #497
    //   Java source line #704	-> byte code offset #506
    //   Java source line #705	-> byte code offset #533
    //   Java source line #706	-> byte code offset #542
    //   Java source line #708	-> byte code offset #549
    //   Java source line #709	-> byte code offset #550
    //   Java source line #711	-> byte code offset #569
    //   Java source line #712	-> byte code offset #571
    //   Java source line #713	-> byte code offset #575
    //   Java source line #715	-> byte code offset #579
    //   Java source line #712	-> byte code offset #582
    //   Java source line #713	-> byte code offset #586
    //   Java source line #716	-> byte code offset #590
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	591	0	this	ConsumerReportConvertor
    //   0	591	1	parentConsumer	Consumer
    //   0	591	2	producer	Producer
    //   1	586	3	writer	java.io.PrintWriter
    //   3	555	4	originhtml	java.io.File
    //   37	351	5	htmlroot	java.io.File
    //   87	448	6	buffer	StringBuffer
    //   209	10	7	additional	String
    //   248	40	8	producerTypes	List
    //   276	127	9	counts	UseReportConverter.CountGroup
    //   279	126	10	link	String
    //   282	143	11	typefile	java.io.File
    //   285	138	12	type	Type2
    //   294	138	13	iter	Iterator
    //   338	89	14	fqname	String
    //   569	11	15	localObject	Object
    //   549	1	16	localIOException	java.io.IOException
    // Exception table:
    //   from	to	target	type
    //   5	546	549	java/io/IOException
    //   5	569	569	finally
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.ConsumerReportConvertor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

public abstract class HTMLConvertor
{
  public static final String HTML_EXTENSION = ".html";
  public static final String XML_EXTENSION = ".xml";
  public static final String HTML_HEADER = "<!doctype HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n";
  public static final String CONTENT_TYPE_META = "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\">\n";
  public static final String W3C_FOOTER = "<p>\n\t<a href=\"http://validator.w3.org/check?uri=referer\">\n<img src=\"http://www.w3.org/Icons/valid-html401-blue\" alt=\"Valid HTML 4.01 Transitional\" height=\"31\" width=\"88\"></a>\n</p>\n";
  public static final String OPEN_TITLE = "<title>";
  public static final String CLOSE_TITLE = "</title>\n";
  public static final String OPEN_HEAD = "<head>\n";
  public static final String CLOSE_HEAD = "</head>\n";
  public static final String OPEN_BODY = "<body>\n";
  public static final String CLOSE_BODY = "</body>\n";
  public static final String OPEN_H3 = "<h3>";
  public static final String CLOSE_H3 = "</h3>\n";
  public static final String OPEN_HTML = "<html>\n";
  public static final String CLOSE_HTML = "</html>\n";
  public static final String CLOSE_TABLE = "</table>\n";
  public static final String OPEN_TD = "<td>";
  public static final String CLOSE_TD = "</td>\n";
  public static final String OPEN_LI = "\t<li>";
  public static final String CLOSE_LI = "</li>\n";
  public static final String OPEN_P = "<p>";
  public static final String CLOSE_P = "</p>\n";
  public static final String OPEN_OL = "<ol>\n";
  public static final String CLOSE_OL = "</ol>\n";
  public static final String OPEN_UL = "<ul>\n";
  public static final String CLOSE_UL = "</ul>\n";
  public static final String OPEN_TR = "<tr>\n";
  public static final String CLOSE_TR = "</tr>\n";
  public static final String CLOSE_DIV = "</div>\n";
  public static final String BR = "<br>";
  public static final String CLOSE_A = "</a>\n";
  public static final String OPEN_B = "<b>";
  public static final String CLOSE_B = "</b>";
  public static final String CLOSE_H4 = "</h4>\n";
  public static final String OPEN_H4 = "<h4>";
  
  public static String openTD(int width)
  {
    StringBuffer buffer = new StringBuffer();
    buffer.append("<td width=\"").append(width).append("%\">");
    return buffer.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.HTMLConvertor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

public abstract interface IReferenceCollection
{
  public abstract void add(String paramString, IReferenceDescriptor paramIReferenceDescriptor);
  
  public abstract boolean hasReferencesTo(String paramString);
  
  public abstract IReferenceDescriptor[] getAllExternalDependencies();
  
  public abstract IReferenceDescriptor[] getExternalDependenciesTo(String[] paramArrayOfString);
  
  public abstract void clear();
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.IReferenceCollection
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMemberDescriptor;

public abstract interface IReferenceDescriptor
{
  public abstract int getLineNumber();
  
  public abstract IMemberDescriptor getMember();
  
  public abstract IComponentDescriptor getComponent();
  
  public abstract int getReferenceKind();
  
  public abstract int getReferenceFlags();
  
  public abstract int getReferenceType();
  
  public abstract IMemberDescriptor getReferencedMember();
  
  public abstract IComponentDescriptor getReferencedComponent();
  
  public abstract int getVisibility();
  
  public abstract String[] getProblemMessages();
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.IReferenceDescriptor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

import org.eclipse.jdt.core.Signature;
import org.eclipse.osgi.util.NLS;

public class MigrationReportConvertor
  extends UseReportConverter
{
  public MigrationReportConvertor(String htmlroot, String xmlroot, String[] topatterns, String[] frompatterns)
  {
    super(htmlroot, xmlroot, topatterns, frompatterns);
  }
  
  protected String getIndexTitle()
  {
    return SearchMessages.MigrationReportConvertor_bundle_migration_information;
  }
  
  protected String getIndexHeader()
  {
    return getIndexTitle();
  }
  
  protected String getReferencedTypeTitle(String bundle)
  {
    return NLS.bind(SearchMessages.MigrationReportConvertor_type_with_unresolved_refs, bundle);
  }
  
  protected String getReferencedTypeHeader(String bundle)
  {
    return getReferencedTypeTitle(bundle);
  }
  
  protected String getAdditionalReferencedTypeInformation()
  {
    return SearchMessages.MigrationReportConvertor_table_shows_unresolved;
  }
  
  protected String getTypeTitle(String typename)
  {
    return NLS.bind(SearchMessages.MigrationReportConvertor_type_migration_information, Signature.getSimpleName(typename));
  }
  
  protected String getTypeHeader(String typename)
  {
    return getTypeTitle(typename);
  }
  
  protected String getTypeDetailsHeader()
  {
    return SearchMessages.MigrationReportConvertor_migration_details;
  }
  
  protected String getTypeDetails()
  {
    return SearchMessages.MigrationReportConvertor_click_table_entry;
  }
  
  protected String getTypeCountSummary(String typename, UseReportConverter.CountGroup counts, int membercount)
  {
    StringBuffer buffer = new StringBuffer();
    buffer.append("<h4>").append(SearchMessages.UseReportConverter_summary).append("</h4>\n");
    buffer.append("<p>").append(NLS.bind(SearchMessages.MigrationReportConvertor_member_has_unresolved_refs, new String[] { typename, Integer.toString(counts.getTotalRefCount()), Integer.toString(membercount) })).append("</p>\n");
    return buffer.toString();
  }
  
  protected String getAdditionalIndexInfo(boolean hasreports)
  {
    if (hasreports)
    {
      StringBuffer buffer = new StringBuffer();
      buffer.append(SearchMessages.MigrationReportConvertor_bundles_have_references);
      return buffer.toString();
    }
    return null;
  }
  
  protected String getNoReportsInformation()
  {
    StringBuffer buffer = new StringBuffer();
    buffer.append("<p>").append("<br>").append(SearchMessages.MigrationReportConvertor_no_reported_migration_problems).append("</p>\n");
    return buffer.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.MigrationReportConvertor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

import com.ibm.icu.text.DateFormat;
import java.io.File;
import java.util.Calendar;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.api.tools.internal.provisional.search.IMetadata;
import org.eclipse.pde.api.tools.internal.util.Util;
import org.w3c.dom.Element;
import org.w3c.dom.NodeList;

public class MissingRefMetadata
  implements IMetadata
{
  public static final String PROFILE = "profile";
  public static final String RUNATDATE = "runatdate";
  public static final String REPORTLOCATION = "reportlocation";
  public static final String APIUUSESCANS = "apiusescans";
  public static final String VALUE = "value";
  public static final String METADATA = "metadata";
  private String profile = null;
  private String runatdate = null;
  private String reportlocation = null;
  private String apiusescans = null;
  
  public MissingRefMetadata() {}
  
  public MissingRefMetadata(String profile, String reportlocation, String apiusescans)
  {
    this.profile = profile;
    runatdate = DateFormat.getDateTimeInstance().format(Calendar.getInstance().getTime());
    this.reportlocation = reportlocation;
    this.apiusescans = apiusescans;
  }
  
  public static MissingRefMetadata getMetadata(File xmlFile)
    throws Exception
  {
    MissingRefMetadata metadata = new MissingRefMetadata();
    try
    {
      if (xmlFile.exists())
      {
        String xmlstr = Util.getFileContentAsString(xmlFile);
        Element doc = Util.parseDocument(xmlstr.trim());
        Element element = null;
        String value = null;String name = null;
        NodeList nodes = doc.getElementsByTagName("*");
        for (int i = 0; i < nodes.getLength(); i++)
        {
          element = (Element)nodes.item(i);
          value = element.getAttribute("value");
          name = element.getNodeName();
          if ("profile".equals(name)) {
            metadata.setProfile(value);
          } else if ("runatdate".equals(name)) {
            metadata.setRunAtDate(value);
          } else if ("reportlocation".equals(name)) {
            metadata.setReportLocation(value);
          } else if ("apiusescans".equals(name)) {
            metadata.setApiUseScans(value);
          }
        }
      }
    }
    catch (CoreException localCoreException)
    {
      throw new Exception(NLS.bind(SearchMessages.MissingRefMetadata_CoreExceptionInParsing, xmlFile.getAbsolutePath()));
    }
    return metadata;
  }
  
  /* Error */
  public void serializeToFile(File file)
    throws java.io.IOException, CoreException
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: invokestatic 209	org/eclipse/pde/api/tools/internal/util/Util:newDocument	()Lorg/w3c/dom/Document;
    //   5: astore_3
    //   6: aload_3
    //   7: ldc 4
    //   9: invokeinterface 213 2 0
    //   14: astore 4
    //   16: aload_3
    //   17: aload 4
    //   19: invokeinterface 214 2 0
    //   24: pop
    //   25: aload_3
    //   26: ldc 5
    //   28: invokeinterface 213 2 0
    //   33: astore 5
    //   35: aload 4
    //   37: aload 5
    //   39: invokeinterface 218 2 0
    //   44: pop
    //   45: aload 5
    //   47: ldc 8
    //   49: aload_0
    //   50: getfield 183	org/eclipse/pde/api/tools/internal/search/MissingRefMetadata:profile	Ljava/lang/String;
    //   53: invokeinterface 217 3 0
    //   58: aload_3
    //   59: ldc 7
    //   61: invokeinterface 213 2 0
    //   66: astore 5
    //   68: aload 4
    //   70: aload 5
    //   72: invokeinterface 218 2 0
    //   77: pop
    //   78: aload 5
    //   80: ldc 8
    //   82: aload_0
    //   83: getfield 185	org/eclipse/pde/api/tools/internal/search/MissingRefMetadata:runatdate	Ljava/lang/String;
    //   86: invokeinterface 217 3 0
    //   91: aload_3
    //   92: ldc 6
    //   94: invokeinterface 213 2 0
    //   99: astore 5
    //   101: aload 4
    //   103: aload 5
    //   105: invokeinterface 218 2 0
    //   110: pop
    //   111: aload 5
    //   113: ldc 8
    //   115: aload_0
    //   116: getfield 184	org/eclipse/pde/api/tools/internal/search/MissingRefMetadata:reportlocation	Ljava/lang/String;
    //   119: invokeinterface 217 3 0
    //   124: aload_3
    //   125: ldc 3
    //   127: invokeinterface 213 2 0
    //   132: astore 5
    //   134: aload 4
    //   136: aload 5
    //   138: invokeinterface 218 2 0
    //   143: pop
    //   144: aload 5
    //   146: ldc 8
    //   148: aload_0
    //   149: getfield 182	org/eclipse/pde/api/tools/internal/search/MissingRefMetadata:apiusescans	Ljava/lang/String;
    //   152: invokeinterface 217 3 0
    //   157: new 97	java/io/BufferedWriter
    //   160: dup
    //   161: new 101	java/io/OutputStreamWriter
    //   164: dup
    //   165: new 99	java/io/FileOutputStream
    //   168: dup
    //   169: aload_1
    //   170: invokespecial 195	java/io/FileOutputStream:<init>	(Ljava/io/File;)V
    //   173: ldc 2
    //   175: invokespecial 196	java/io/OutputStreamWriter:<init>	(Ljava/io/OutputStream;Ljava/lang/String;)V
    //   178: invokespecial 191	java/io/BufferedWriter:<init>	(Ljava/io/Writer;)V
    //   181: astore_2
    //   182: aload_2
    //   183: aload_3
    //   184: invokestatic 211	org/eclipse/pde/api/tools/internal/util/Util:serializeDocument	(Lorg/w3c/dom/Document;)Ljava/lang/String;
    //   187: invokevirtual 192	java/io/BufferedWriter:write	(Ljava/lang/String;)V
    //   190: aload_2
    //   191: invokevirtual 190	java/io/BufferedWriter:flush	()V
    //   194: goto +16 -> 210
    //   197: astore 6
    //   199: aload_2
    //   200: ifnull +7 -> 207
    //   203: aload_2
    //   204: invokevirtual 189	java/io/BufferedWriter:close	()V
    //   207: aload 6
    //   209: athrow
    //   210: aload_2
    //   211: ifnull +7 -> 218
    //   214: aload_2
    //   215: invokevirtual 189	java/io/BufferedWriter:close	()V
    //   218: return
    // Line number table:
    //   Java source line #136	-> byte code offset #0
    //   Java source line #138	-> byte code offset #2
    //   Java source line #139	-> byte code offset #6
    //   Java source line #140	-> byte code offset #16
    //   Java source line #142	-> byte code offset #25
    //   Java source line #143	-> byte code offset #35
    //   Java source line #144	-> byte code offset #45
    //   Java source line #146	-> byte code offset #58
    //   Java source line #147	-> byte code offset #68
    //   Java source line #148	-> byte code offset #78
    //   Java source line #150	-> byte code offset #91
    //   Java source line #151	-> byte code offset #101
    //   Java source line #152	-> byte code offset #111
    //   Java source line #154	-> byte code offset #124
    //   Java source line #155	-> byte code offset #134
    //   Java source line #156	-> byte code offset #144
    //   Java source line #158	-> byte code offset #157
    //   Java source line #159	-> byte code offset #182
    //   Java source line #160	-> byte code offset #190
    //   Java source line #161	-> byte code offset #197
    //   Java source line #162	-> byte code offset #199
    //   Java source line #163	-> byte code offset #203
    //   Java source line #165	-> byte code offset #207
    //   Java source line #162	-> byte code offset #210
    //   Java source line #163	-> byte code offset #214
    //   Java source line #166	-> byte code offset #218
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	219	0	this	MissingRefMetadata
    //   0	219	1	file	File
    //   1	214	2	writer	java.io.BufferedWriter
    //   5	179	3	doc	org.w3c.dom.Document
    //   14	121	4	root	Element
    //   33	112	5	child	Element
    //   197	11	6	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   2	197	197	finally
  }
  
  public void setProfile(String profile)
  {
    this.profile = profile;
  }
  
  public String getProfile()
  {
    return profile;
  }
  
  public void setRunAtDate(String date)
  {
    runatdate = date;
  }
  
  public String getRunAtDate()
  {
    return runatdate;
  }
  
  public String getReportLocation()
  {
    return reportlocation;
  }
  
  public void setReportLocation(String location)
  {
    reportlocation = location;
  }
  
  public String getApiUseScans()
  {
    return apiusescans;
  }
  
  public void setApiUseScans(String apiusescans)
  {
    this.apiusescans = apiusescans;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.MissingRefMetadata
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

import java.io.File;
import java.io.FileFilter;

class MissingRefParser$1
  implements FileFilter
{
  public boolean accept(File pathname)
  {
    return (pathname.isFile()) && (pathname.getName().endsWith(".xml"));
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.MissingRefParser.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import org.eclipse.pde.api.tools.internal.problems.ApiProblem;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

class MissingRefParser$MissingRefProblemHandler
  extends DefaultHandler
{
  List problems;
  private String typename;
  private int linenumber;
  private int charstart;
  private int charend;
  private int id;
  private List messageargs;
  private Map extraargs;
  final MissingRefParser this$0;
  
  MissingRefParser$MissingRefProblemHandler(MissingRefParser paramMissingRefParser)
  {
    this$0 = paramMissingRefParser;
    
    problems = new ArrayList();
    
    messageargs = new ArrayList();
    extraargs = new HashMap();
  }
  
  public void startDocument()
    throws SAXException
  {}
  
  public void startElement(String uri, String localName, String qName, Attributes attributes)
    throws SAXException
  {
    if ("api_problem".equalsIgnoreCase(qName))
    {
      typename = attributes.getValue("typeName");
      linenumber = Integer.parseInt(attributes.getValue("linenumber"));
      charstart = Integer.parseInt(attributes.getValue("charstart"));
      charend = Integer.parseInt(attributes.getValue("charend"));
      id = Integer.parseInt(attributes.getValue("id"));
    }
    else if ("message_arguments".equalsIgnoreCase(qName))
    {
      messageargs.clear();
    }
    else if ("message_argument".equalsIgnoreCase(qName))
    {
      messageargs.add(attributes.getValue("value"));
    }
    else if ("extra_arguments".equalsIgnoreCase(qName))
    {
      extraargs.clear();
    }
    else if ("extra_argument".equalsIgnoreCase(qName))
    {
      extraargs.put(attributes.getValue("id"), attributes.getValue("value"));
    }
  }
  
  public void endElement(String uri, String localName, String qName)
    throws SAXException
  {
    if ("api_problem".equalsIgnoreCase(qName))
    {
      String[] argumentids = new String[extraargs.size()];
      Object[] arguments = new Object[extraargs.size()];
      int i = 0;
      for (Iterator iterator = extraargs.keySet().iterator(); iterator.hasNext(); i++)
      {
        argumentids[i] = ((String)iterator.next());
        arguments[i] = extraargs.get(argumentids[i]);
      }
      ApiProblem problem = new ApiProblem(null, typename, (String[])messageargs.toArray(new String[messageargs.size()]), argumentids, arguments, linenumber, charstart, charend, id);
      problems.add(problem);
    }
  }
  
  public void endDocument()
    throws SAXException
  {}
  
  public List getProblems()
  {
    return problems;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.MissingRefParser.MissingRefProblemHandler
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
import javax.xml.parsers.SAXParser;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.api.tools.internal.problems.ApiProblem;
import org.eclipse.pde.api.tools.internal.provisional.Factory;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
import org.eclipse.pde.api.tools.internal.util.Util;
import org.xml.sax.Attributes;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.DefaultHandler;

class MissingRefParser
  extends UseScanParser
{
  class MissingRefProblemHandler
    extends DefaultHandler
  {
    List problems = new ArrayList();
    private String typename;
    private int linenumber;
    private int charstart;
    private int charend;
    private int id;
    private List messageargs = new ArrayList();
    private Map extraargs = new HashMap();
    
    MissingRefProblemHandler() {}
    
    public void startDocument()
      throws SAXException
    {}
    
    public void startElement(String uri, String localName, String qName, Attributes attributes)
      throws SAXException
    {
      if ("api_problem".equalsIgnoreCase(qName))
      {
        typename = attributes.getValue("typeName");
        linenumber = Integer.parseInt(attributes.getValue("linenumber"));
        charstart = Integer.parseInt(attributes.getValue("charstart"));
        charend = Integer.parseInt(attributes.getValue("charend"));
        id = Integer.parseInt(attributes.getValue("id"));
      }
      else if ("message_arguments".equalsIgnoreCase(qName))
      {
        messageargs.clear();
      }
      else if ("message_argument".equalsIgnoreCase(qName))
      {
        messageargs.add(attributes.getValue("value"));
      }
      else if ("extra_arguments".equalsIgnoreCase(qName))
      {
        extraargs.clear();
      }
      else if ("extra_argument".equalsIgnoreCase(qName))
      {
        extraargs.put(attributes.getValue("id"), attributes.getValue("value"));
      }
    }
    
    public void endElement(String uri, String localName, String qName)
      throws SAXException
    {
      if ("api_problem".equalsIgnoreCase(qName))
      {
        String[] argumentids = new String[extraargs.size()];
        Object[] arguments = new Object[extraargs.size()];
        int i = 0;
        for (Iterator iterator = extraargs.keySet().iterator(); iterator.hasNext(); i++)
        {
          argumentids[i] = ((String)iterator.next());
          arguments[i] = extraargs.get(argumentids[i]);
        }
        ApiProblem problem = new ApiProblem(null, typename, (String[])messageargs.toArray(new String[messageargs.size()]), argumentids, arguments, linenumber, charstart, charend, id);
        problems.add(problem);
      }
    }
    
    public void endDocument()
      throws SAXException
    {}
    
    public List getProblems()
    {
      return problems;
    }
  }
  
  static final FileFilter filter = new FileFilter()
  {
    public boolean accept(File pathname)
    {
      return (pathname.isFile()) && (pathname.getName().endsWith(".xml"));
    }
  };
  
  public void parse(String xmlLocation, MissingRefReportConverter.MissingRefVisitor visitor)
    throws Exception
  {
    if (xmlLocation == null) {
      throw new Exception(SearchMessages.missing_xml_files_location);
    }
    File reportsRoot = new File(xmlLocation);
    if ((!reportsRoot.exists()) || (!reportsRoot.isDirectory())) {
      throw new Exception(NLS.bind(SearchMessages.invalid_directory_name, xmlLocation));
    }
    File[] components = getDirectories(reportsRoot);
    components = sort(components);
    
    visitor.visitScan();
    SAXParser parser = getParser();
    for (int i = 0; i < components.length; i++) {
      if (components[i].isDirectory())
      {
        String[] idv = getIdVersion(components[i].getName());
        IComponentDescriptor targetComponent = Factory.componentDescriptor(idv[0], idv[1]);
        if (visitor.visitComponent(targetComponent))
        {
          File[] xmlfiles = Util.getAllFiles(components[i], filter);
          if ((xmlfiles != null) && (xmlfiles.length > 0))
          {
            xmlfiles = sort(xmlfiles);
            for (int k = 0; k < xmlfiles.length; k++) {
              try
              {
                MissingRefProblemHandler handler = new MissingRefProblemHandler();
                parser.parse(xmlfiles[k], handler);
                List apiProblems = handler.getProblems();
                visitor.addToCurrentReport(apiProblems);
              }
              catch (SAXException localSAXException) {}catch (IOException localIOException) {}
            }
          }
          visitor.endVisitComponent();
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.MissingRefParser
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

import java.util.Comparator;
import org.eclipse.pde.api.tools.internal.problems.ApiProblem;

class MissingRefReportConverter$1
  implements Comparator
{
  public int compare(Object o1, Object o2)
  {
    if (((o1 instanceof String)) && ((o2 instanceof String))) {
      return ((String)o1).compareTo((String)o2);
    }
    if (((o1 instanceof ApiProblem)) && ((o2 instanceof ApiProblem))) {
      return ((ApiProblem)o1).getMessage().compareTo(((ApiProblem)o2).getMessage());
    }
    return 0;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.MissingRefReportConverter.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

import java.util.Comparator;

class MissingRefReportConverter$2
  implements Comparator
{
  final MissingRefReportConverter this$0;
  
  MissingRefReportConverter$2(MissingRefReportConverter paramMissingRefReportConverter)
  {
    this$0 = paramMissingRefReportConverter;
  }
  
  public int compare(Object o1, Object o2)
  {
    return name.compareTo(name);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.api.tools.internal.search.MissingRefReportConverter.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.api.tools.internal.search;

import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Map.Entry;
import java.util.Set;
import java.util.TreeMap;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.api.tools.internal.problems.ApiProblem;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IComponentDescriptor;
import org.osgi.framework.Version;

class MissingRefReportConverter$MissingRefVisitor
{
  public List reports;
  final MissingRefReportConverter this$0;
  
  MissingRefReportConverter$MissingRefVisitor(MissingRefReportConverter paramMissingRefReportConverter)
  {
    this$0 = paramMissingRefReportConverter;
  }
  
  public void visitScan()
  {
    reports = new ArrayList();
  }
  
  public boolean visitComponent(IComponentDescriptor targetComponent)
  {
    this$0.currentreport = new MissingRefReportConverter.Report();
    this$0.currentreport.name = composeName(targetComponent.getId(), targetComponent.getVersion());
    reports.add(this$0.currentreport);
    return true;
  }
  
  protected String composeName(String id, String version)
  {
    String versionName = version;
    if (version == null) {
      versionName = Version.emptyVersion.toString();
    }
    StringBuffer buffer = new StringBuffer(3 + id.length() + versionName.length());
    buffer.append(id).append(" (").append(versionName).append(")");
    return buffer.toString();
  }
  
  public void endVisitComponent()
  {
    try
    {
      writeIndexFileForComponent(this$0.currentreport);
    }
    catch (Exception e)
    {
      ApiPlugin.log(e);
    }
  }
  
  /* Error */
  private void writeIndexFileForComponent(MissingRefReportConverter.Report report)
    throws Exception
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: aconst_null
    //   3: astore_3
    //   4: new 207	java/io/File
    //   7: dup
    //   8: aload_0
    //   9: getfield 351	org/eclipse/pde/api/tools/internal/search/MissingRefReportConverter$MissingRefVisitor:this$0	Lorg/eclipse/pde/api/tools/internal/search/MissingRefReportConverter;
    //   12: invokevirtual 399	org/eclipse/pde/api/tools/internal/search/MissingRefReportConverter:getHtmlLocation	()Ljava/lang/String;
    //   15: aload_1
    //   16: getfield 352	org/eclipse/pde/api/tools/internal/search/MissingRefReportConverter$Report:name	Ljava/lang/String;
    //   19: invokespecial 371	java/io/File:<init>	(Ljava/lang/String;Ljava/lang/String;)V
    //   22: astore 4
    //   24: aload 4
    //   26: invokevirtual 367	java/io/File:exists	()Z
    //   29: ifne +9 -> 38
    //   32: aload 4
    //   34: invokevirtual 368	java/io/File:mkdirs	()Z
    //   37: pop
    //   38: new 207	java/io/File
    //   41: dup
    //   42: aload 4
    //   44: ldc 17
    //   46: invokespecial 370	java/io/File:<init>	(Ljava/io/File;Ljava/lang/String;)V
    //   49: astore_3
    //   50: aload_3
    //   51: invokevirtual 367	java/io/File:exists	()Z
    //   54: ifne +8 -> 62
    //   57: aload_3
    //   58: invokevirtual 366	java/io/File:createNewFile	()Z
    //   61: pop
    //   62: new 216	java/lang/StringBuffer
    //   65: dup
    //   
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd