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

hangedtypes, IApiComponent reference, IApiComponent component, SubMonitor localMonitor)
    throws CoreException
  {
    for (int i = 0; i < changedtypes.length; i++) {
      if (changedtypes[i] != null)
      {
        checkCompatibility(changedtypes[i], reference, component, localMonitor.newChild(1));
        Util.updateMonitor(localMonitor);
      }
    }
  }
  
  /* Error */
  private void checkUnusedProblemFilters(IBuildContext context, IApiComponent reference, IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 1500	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:ignoreUnusedProblemFilterCheck	()Z
    //   4: ifeq +24 -> 28
    //   7: getstatic 1381	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:DEBUG	Z
    //   10: ifeq +12 -> 22
    //   13: getstatic 1378	java/lang/System:out	Ljava/io/PrintStream;
    //   16: ldc_w 698
    //   19: invokevirtual 1413	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   22: aload_3
    //   23: iconst_1
    //   24: invokestatic 1601	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   27: return
    //   28: aload_2
    //   29: invokeinterface 1706 1 0
    //   34: checkcast 803	org/eclipse/pde/api/tools/internal/ApiFilterStore
    //   37: astore 4
    //   39: aload_0
    //   40: getfield 1386	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:fJavaProject	Lorg/eclipse/jdt/core/IJavaProject;
    //   43: invokeinterface 1647 1 0
    //   48: astore 5
    //   50: invokestatic 1578	org/eclipse/pde/api/tools/internal/provisional/ApiPlugin:getDefault	()Lorg/eclipse/pde/api/tools/internal/provisional/ApiPlugin;
    //   53: ldc_w 715
    //   56: aload 5
    //   58: invokevirtual 1580	org/eclipse/pde/api/tools/internal/provisional/ApiPlugin:getEnableState	(Ljava/lang/String;Lorg/eclipse/core/resources/IProject;)Z
    //   61: istore 6
    //   63: aconst_null
    //   64: astore 7
    //   66: iload 6
    //   68: ifeq +14 -> 82
    //   71: new 759	java/util/ArrayList
    //   74: dup
    //   75: bipush 8
    //   77: invokespecial 1450	java/util/ArrayList:<init>	(I)V
    //   80: astore 7
    //   82: aconst_null
    //   83: checkcast 740	[Lorg/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemFilter;
    //   86: astore 8
    //   88: aload_1
    //   89: invokeinterface 1681 1 0
    //   94: ifeq +124 -> 218
    //   97: aconst_null
    //   98: astore 9
    //   100: aload_0
    //   101: aload_1
    //   102: invokevirtual 1513	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:getApiUseTypes	(Lorg/eclipse/pde/api/tools/internal/provisional/builder/IBuildContext;)[Ljava/lang/String;
    //   105: astore 10
    //   107: iconst_0
    //   108: istore 11
    //   110: goto +83 -> 193
    //   113: aload 10
    //   115: iload 11
    //   117: aaload
    //   118: ifnonnull +6 -> 124
    //   121: goto +69 -> 190
    //   124: aload 5
    //   126: aload_0
    //   127: getfield 1386	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:fJavaProject	Lorg/eclipse/jdt/core/IJavaProject;
    //   130: aload 10
    //   132: iload 11
    //   134: aaload
    //   135: invokestatic 1590	org/eclipse/pde/api/tools/internal/util/Signatures:getPrimaryTypeName	(Ljava/lang/String;)Ljava/lang/String;
    //   138: invokeinterface 1649 2 0
    //   143: invokestatic 1613	org/eclipse/pde/api/tools/internal/util/Util:getResource	(Lorg/eclipse/core/resources/IProject;Lorg/eclipse/jdt/core/IType;)Lorg/eclipse/core/resources/IResource;
    //   146: astore 9
    //   148: aload 9
    //   150: ifnull +40 -> 190
    //   153: aload 4
    //   155: aload 9
    //   157: aload 10
    //   159: iload 11
    //   161: aaload
    //   162: aconst_null
    //   163: invokevirtual 1492	org/eclipse/pde/api/tools/internal/ApiFilterStore:getUnusedFilters	(Lorg/eclipse/core/resources/IResource;Ljava/lang/String;[I)[Lorg/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemFilter;
    //   166: astore 8
    //   168: iload 6
    //   170: ifeq +14 -> 184
    //   173: aload_0
    //   174: aload 7
    //   176: aload 8
    //   178: invokevirtual 1511	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:addToList	(Ljava/util/List;[Ljava/lang/Object;)V
    //   181: goto +9 -> 190
    //   184: aload_0
    //   185: aload 8
    //   187: invokespecial 1510	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:createUnusedApiFilterProblems	([Lorg/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemFilter;)V
    //   190: iinc 11 1
    //   193: iload 11
    //   195: aload 10
    //   197: arraylength
    //   198: if_icmplt -85 -> 113
    //   201: iload 6
    //   203: ifeq +78 -> 281
    //   206: aload_0
    //   207: aload 4
    //   209: aload 7
    //   211: aload_3
    //   212: invokevirtual 1522	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:removeUnusedProblemFilters	(Lorg/eclipse/pde/api/tools/internal/provisional/IApiFilterStore;Ljava/util/List;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   215: goto +66 -> 281
    //   218: aload 4
    //   220: aconst_null
    //   221: aconst_null
    //   222: aconst_null
    //   223: invokevirtual 1492	org/eclipse/pde/api/tools/internal/ApiFilterStore:getUnusedFilters	(Lorg/eclipse/core/resources/IResource;Ljava/lang/String;[I)[Lorg/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemFilter;
    //   226: astore 8
    //   228: iload 6
    //   230: ifeq +23 -> 253
    //   233: aload_0
    //   234: aload 7
    //   236: aload 8
    //   238: invokevirtual 1511	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:addToList	(Ljava/util/List;[Ljava/lang/Object;)V
    //   241: aload_0
    //   242: aload 4
    //   244: aload 7
    //   246: aload_3
    //   247: invokevirtual 1522	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:removeUnusedProblemFilters	(Lorg/eclipse/pde/api/tools/internal/provisional/IApiFilterStore;Ljava/util/List;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   250: goto +31 -> 281
    //   253: aload_0
    //   254: aload 8
    //   256: invokespecial 1510	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:createUnusedApiFilterProblems	([Lorg/eclipse/pde/api/tools/internal/provisional/problems/IApiProblemFilter;)V
    //   259: goto +22 -> 281
    //   262: pop
    //   263: aload_3
    //   264: iconst_1
    //   265: invokestatic 1601	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   268: goto +18 -> 286
    //   271: astore 12
    //   273: aload_3
    //   274: iconst_1
    //   275: invokestatic 1601	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   278: aload 12
    //   280: athrow
    //   281: aload_3
    //   282: iconst_1
    //   283: invokestatic 1601	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   286: return
    // Line number table:
    //   Java source line #519	-> byte code offset #0
    //   Java source line #520	-> byte code offset #7
    //   Java source line #521	-> byte code offset #13
    //   Java source line #523	-> byte code offset #22
    //   Java source line #524	-> byte code offset #27
    //   Java source line #527	-> byte code offset #28
    //   Java source line #528	-> byte code offset #39
    //   Java source line #529	-> byte code offset #50
    //   Java source line #530	-> byte code offset #63
    //   Java source line #531	-> byte code offset #66
    //   Java source line #532	-> byte code offset #71
    //   Java source line #534	-> byte code offset #82
    //   Java source line #535	-> byte code offset #88
    //   Java source line #536	-> byte code offset #97
    //   Java source line #537	-> byte code offset #100
    //   Java source line #538	-> byte code offset #107
    //   Java source line #539	-> byte code offset #113
    //   Java source line #540	-> byte code offset #121
    //   Java source line #542	-> byte code offset #124
    //   Java source line #543	-> byte code offset #148
    //   Java source line #544	-> byte code offset #153
    //   Java source line #545	-> byte code offset #168
    //   Java source line #546	-> byte code offset #173
    //   Java source line #547	-> byte code offset #181
    //   Java source line #549	-> byte code offset #184
    //   Java source line #538	-> byte code offset #190
    //   Java source line #570	-> byte code offset #201
    //   Java source line #571	-> byte code offset #206
    //   Java source line #574	-> byte code offset #218
    //   Java source line #575	-> byte code offset #228
    //   Java source line #576	-> byte code offset #233
    //   Java source line #577	-> byte code offset #241
    //   Java source line #581	-> byte code offset #253
    //   Java source line #585	-> byte code offset #262
    //   Java source line #589	-> byte code offset #263
    //   Java source line #588	-> byte code offset #271
    //   Java source line #589	-> byte code offset #273
    //   Java source line #590	-> byte code offset #278
    //   Java source line #589	-> byte code offset #281
    //   Java source line #591	-> byte code offset #286
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	287	0	this	BaseApiAnalyzer
    //   0	287	1	context	IBuildContext
    //   0	287	2	reference	IApiComponent
    //   0	287	3	monitor	IProgressMonitor
    //   37	206	4	store	org.eclipse.pde.api.tools.internal.ApiFilterStore
    //   48	77	5	project	IProject
    //   61	168	6	autoremove	boolean
    //   64	181	7	toremove	ArrayList
    //   86	169	8	filters	IApiProblemFilter[]
    //   98	58	9	resource	IResource
    //   105	91	10	types	String[]
    //   108	86	11	i	int
    //   271	8	12	localObject	Object
    //   262	1	13	localCoreException	CoreException
    // Exception table:
    //   from	to	target	type
    //   28	259	262	org/eclipse/core/runtime/CoreException
    //   28	263	271	finally
  }
  
  void addToList(List list, Object[] array)
  {
    for (int i = 0; i < array.length; i++) {
      if (array[i] != null) {
        list.add(array[i]);
      }
    }
  }
  
  void removeUnusedProblemFilters(IApiFilterStore store, List filterlist, IProgressMonitor monitor)
    throws CoreException
  {
    if (filterlist.size() > 0)
    {
      IWorkspaceRunnable runner = new IWorkspaceRunnable()
      {
        private final IApiFilterStore val$store;
        private final List val$filterlist;
        
        public void run(IProgressMonitor monitor)
          throws CoreException
        {
          val$store.removeFilters((IApiProblemFilter[])val$filterlist.toArray(new IApiProblemFilter[val$filterlist.size()]));
        }
      };
      ResourcesPlugin.getWorkspace().run(runner, null, 1, monitor);
    }
  }
  
  private void createUnusedApiFilterProblems(IApiProblemFilter[] filters)
  {
    if (fJavaProject == null) {
      return;
    }
    IApiProblemFilter filter = null;
    IApiProblem problem = null;
    for (int i = 0; i < filters.length; i++)
    {
      filter = filters[i];
      problem = filter.getUnderlyingProblem();
      if (problem == null) {
        return;
      }
      IResource resource = null;
      IType type = null;
      
      int lineNumber = 0;
      int charStart = -1;
      int charEnd = 1;
      if (fJavaProject != null) {
        try
        {
          String typeName = problem.getTypeName();
          if (typeName != null) {
            type = fJavaProject.findType(typeName.replace('$', '.'));
          }
          IProject project = fJavaProject.getProject();
          resource = Util.getResource(project, type);
          if (resource == null) {
            return;
          }
          if ((!Util.isManifest(resource.getProjectRelativePath())) && (!type.isBinary()))
          {
            ISourceRange range = type.getNameRange();
            charStart = range.getOffset();
            charEnd = charStart + range.getLength();
            try
            {
              IDocument document = Util.getDocument(type.getCompilationUnit());
              lineNumber = document.getLineOfOffset(charStart);
            }
            catch (BadLocationException localBadLocationException) {}
          }
          path = null;
        }
        catch (JavaModelException e)
        {
          ApiPlugin.log(e);
        }
        catch (CoreException e)
        {
          ApiPlugin.log(e);
        }
      }
      String path;
      if (resource != null) {
        path = resource.getProjectRelativePath().toPortableString();
      }
      addProblem(ApiProblemFactory.newApiUsageProblem(path, 
        problem.getTypeName(), 
        new String[] { filter.getUnderlyingProblem().getMessage() }, 
        new String[] { "filterhandle", "apiMarkerID" }, 
        new Object[] { ((ApiProblemFilter)filter).getHandle(), new Integer(9) }, 
        lineNumber, 
        charStart, 
        charEnd, 
        problem.getElementKind(), 
        10));
    }
  }
  
  private ReexportedBundleVersionInfo checkBundleVersionsOfReexportedBundles(IApiComponent reference, IApiComponent component)
    throws CoreException
  {
    IRequiredComponentDescription[] requiredComponents = component.getRequiredComponents();
    int length = requiredComponents.length;
    ReexportedBundleVersionInfo info = null;
    if (length != 0) {
      for (int i = 0; i < length; i++)
      {
        IRequiredComponentDescription description = requiredComponents[i];
        if (description.isExported())
        {
          String id = description.getId();
          IRequiredComponentDescription[] requiredComponents2 = reference.getRequiredComponents();
          
          IRequiredComponentDescription referenceDescription = null;
          int length2 = requiredComponents2.length;
          for (int j = 0; j < length2; j++)
          {
            IRequiredComponentDescription description2 = requiredComponents2[j];
            if ((description2.getId().equals(id)) && 
              (description2.isExported()))
            {
              referenceDescription = description2;
              break;
            }
          }
          if (referenceDescription != null)
          {
            IVersionRange versionRange = description.getVersionRange();
            IVersionRange versionRange2 = referenceDescription.getVersionRange();
            
            Version currentLowerBound = new Version(versionRange.getMinimumVersion());
            Version referenceLowerBound = new Version(versionRange2.getMinimumVersion());
            
            int currentLowerMajorVersion = currentLowerBound.getMajor();
            int referenceLowerMajorVersion = referenceLowerBound.getMajor();
            int currentLowerMinorVersion = currentLowerBound.getMinor();
            int referenceLowerMinorVersion = referenceLowerBound.getMinor();
            if ((currentLowerMajorVersion < referenceLowerMajorVersion) || 
              (currentLowerMinorVersion < referenceLowerMinorVersion)) {
              return new ReexportedBundleVersionInfo(id, 5);
            }
            if (currentLowerMajorVersion > referenceLowerMajorVersion) {
              return new ReexportedBundleVersionInfo(id, 5);
            }
            if (currentLowerMinorVersion > referenceLowerMinorVersion) {
              info = new ReexportedBundleVersionInfo(id, 6);
            }
          }
        }
      }
    }
    return info;
  }
  
  private CompilationUnit createAST(ITypeRoot root, int offset)
  {
    if (fJavaProject == null) {
      return null;
    }
    ASTParser parser = ASTParser.newParser(4);
    parser.setFocalPosition(offset);
    parser.setResolveBindings(false);
    parser.setSource(root);
    Map options = fJavaProject.getOptions(true);
    options.put("org.eclipse.jdt.core.compiler.doc.comment.support", "enabled");
    parser.setCompilerOptions(options);
    return (CompilationUnit)parser.createAST(new NullProgressMonitor());
  }
  
  private BuildState getBuildState()
  {
    IProject project = null;
    if (fJavaProject != null) {
      project = fJavaProject.getProject();
    }
    if (project == null) {
      return new BuildState();
    }
    try
    {
      BuildState state = BuildState.getLastBuiltState(project);
      if (state != null) {
        return state;
      }
    }
    catch (CoreException localCoreException) {}
    return new BuildState();
  }
  
  private IApiTypeContainer getSearchScope(IApiComponent component, String[] typenames)
  {
    if (typenames == null) {
      return component;
    }
    if (typenames.length == 0) {
      return component;
    }
    return Factory.newTypeScope(component, getScopedElements(typenames));
  }
  
  private IReferenceTypeDescriptor[] getScopedElements(String[] typenames)
  {
    ArrayList types = new ArrayList(typenames.length);
    for (int i = 0; i < typenames.length; i++) {
      if (typenames[i] != null) {
        types.add(Util.getType(typenames[i]));
      }
    }
    return (IReferenceTypeDescriptor[])types.toArray(new IReferenceTypeDescriptor[types.size()]);
  }
  
  public IApiProblem[] getProblems()
  {
    if (fProblems == null) {
      return new IApiProblem[0];
    }
    return (IApiProblem[])fProblems.toArray(new IApiProblem[fProblems.size()]);
  }
  
  public void dispose()
  {
    if (fProblems != null)
    {
      fProblems.clear();
      fProblems = null;
    }
    if (fPendingDeltaInfos != null)
    {
      fPendingDeltaInfos.clear();
      fPendingDeltaInfos = null;
    }
    if (fBuildState != null) {
      fBuildState = null;
    }
  }
  
  private boolean ignoreApiUsageScan()
  {
    if (fJavaProject == null) {
      return false;
    }
    IProject project = fJavaProject.getProject();
    boolean ignore = true;
    ApiPlugin plugin = ApiPlugin.getDefault();
    ignore &= plugin.getSeverityLevel("ILLEGAL_EXTEND", project) == 0;
    ignore &= plugin.getSeverityLevel("ILLEGAL_IMPLEMENT", project) == 0;
    ignore &= plugin.getSeverityLevel("ILLEGAL_INSTANTIATE", project) == 0;
    ignore &= plugin.getSeverityLevel("ILLEGAL_REFERENCE", project) == 0;
    ignore &= plugin.getSeverityLevel("ILLEGAL_OVERRIDE", project) == 0;
    ignore &= plugin.getSeverityLevel("LEAK_EXTEND", project) == 0;
    ignore &= plugin.getSeverityLevel("LEAK_FIELD_DECL", project) == 0;
    ignore &= plugin.getSeverityLevel("LEAK_IMPLEMENT", project) == 0;
    ignore &= plugin.getSeverityLevel("LEAK_METHOD_PARAM", project) == 0;
    ignore &= plugin.getSeverityLevel("LEAK_METHOD_RETURN_TYPE", project) == 0;
    ignore &= plugin.getSeverityLevel("INVALID_REFERENCE_IN_SYSTEM_LIBRARIES", project) == 0;
    return ignore;
  }
  
  private boolean reportApiBreakageWhenMajorVersionIncremented()
  {
    if (fJavaProject == null) {
      return false;
    }
    return ApiPlugin.getDefault().getEnableState("report_api_breakage_when_major_version_incremented", fJavaProject.getProject().getProject());
  }
  
  private boolean ignoreDefaultBaselineCheck()
  {
    if (fJavaProject == null) {
      return true;
    }
    return ApiPlugin.getDefault().getSeverityLevel("missing_default_api_profile", fJavaProject.getProject().getProject()) == 0;
  }
  
  private boolean ignoreSinceTagCheck(String pref)
  {
    if (fJavaProject == null) {
      return true;
    }
    IProject project = fJavaProject.getProject();
    ApiPlugin plugin = ApiPlugin.getDefault();
    if (pref == null)
    {
      boolean ignore = plugin.getSeverityLevel("malformed_since_tag", project) == 0;
      ignore &= plugin.getSeverityLevel("invalid_since_tag_version", project) == 0;
      ignore &= plugin.getSeverityLevel("missing_since_tag", project) == 0;
      return ignore;
    }
    return plugin.getSeverityLevel(pref, project) == 0;
  }
  
  private boolean ignoreComponentVersionCheck()
  {
    if (fJavaProject == null) {
      return false;
    }
    return ApiPlugin.getDefault().getSeverityLevel("incompatible_api_component_version", fJavaProject.getProject().getProject()) == 0;
  }
  
  private boolean ignoreMinorVersionCheckWithoutApiChange()
  {
    if (fJavaProject == null) {
      return true;
    }
    return !ApiPlugin.getDefault().getEnableState("incompatible_api_component_version_include_minor_without_api_change", fJavaProject.getProject().getProject());
  }
  
  private boolean ignoreMajorVersionCheckWithoutBreakingChange()
  {
    if (fJavaProject == null) {
      return true;
    }
    return !ApiPlugin.getDefault().getEnableState("incompatible_api_component_version_include_major_without_breaking_change", fJavaProject.getProject().getProject());
  }
  
  private boolean ignoreInvalidTagCheck()
  {
    if (fJavaProject == null) {
      return true;
    }
    return ApiPlugin.getDefault().getSeverityLevel("INVALID_JAVADOC_TAG", fJavaProject.getProject()) == 0;
  }
  
  private boolean ignoreUnusedProblemFilterCheck()
  {
    if (fJavaProject == null) {
      return true;
    }
    return ApiPlugin.getDefault().getSeverityLevel("UNUSED_PROBLEM_FILTERS", fJavaProject.getProject()) == 0;
  }
  
  /* Error */
  private void checkTagValidation(IBuildContext context, IApiComponent component, IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 1497	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:ignoreInvalidTagCheck	()Z
    //   4: ifeq +4 -> 8
    //   7: return
    //   8: aconst_null
    //   9: astore 4
    //   11: aload_3
    //   12: getstatic 1400	org/eclipse/pde/api/tools/internal/builder/BuilderMessages:BaseApiAnalyzer_validating_javadoc_tags	Ljava/lang/String;
    //   15: iconst_1
    //   16: aload_2
    //   17: invokeinterface 1709 1 0
    //   22: arraylength
    //   23: iadd
    //   24: invokestatic 1472	org/eclipse/core/runtime/SubMonitor:convert	(Lorg/eclipse/core/runtime/IProgressMonitor;Ljava/lang/String;I)Lorg/eclipse/core/runtime/SubMonitor;
    //   27: astore 4
    //   29: aload_1
    //   30: invokeinterface 1681 1 0
    //   35: ifeq +72 -> 107
    //   38: aload_1
    //   39: invokeinterface 1683 1 0
    //   44: astore 5
    //   46: iconst_0
    //   47: istore 6
    //   49: goto +47 -> 96
    //   52: aload 5
    //   54: iload 6
    //   56: aaload
    //   57: ifnonnull +6 -> 63
    //   60: goto +33 -> 93
    //   63: aload 4
    //   65: getstatic 1399	org/eclipse/pde/api/tools/internal/builder/BuilderMessages:BaseApiAnalyzer_scanning_0	Ljava/lang/String;
    //   68: aload 5
    //   70: iload 6
    //   72: aaload
    //   73: invokestatic 1488	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
    //   76: invokevirtual 1469	org/eclipse/core/runtime/SubMonitor:subTask	(Ljava/lang/String;)V
    //   79: aload_0
    //   80: aload 5
    //   82: iload 6
    //   84: aaload
    //   85: invokespecial 1503	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:processType	(Ljava/lang/String;)V
    //   88: aload 4
    //   90: invokestatic 1600	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   93: iinc 6 1
    //   96: iload 6
    //   98: aload 5
    //   100: arraylength
    //   101: if_icmplt -49 -> 52
    //   104: goto +101 -> 205
    //   107: aload_0
    //   108: getfield 1386	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:fJavaProject	Lorg/eclipse/jdt/core/IJavaProject;
    //   111: invokeinterface 1648 1 0
    //   116: astore 5
    //   118: iconst_0
    //   119: istore 6
    //   121: goto +66 -> 187
    //   124: aload 5
    //   126: iload 6
    //   128: aaload
    //   129: invokeinterface 1657 1 0
    //   134: iconst_1
    //   135: if_icmpne +49 -> 184
    //   138: aload 4
    //   140: getstatic 1399	org/eclipse/pde/api/tools/internal/builder/BuilderMessages:BaseApiAnalyzer_scanning_0	Ljava/lang/String;
    //   143: aload 5
    //   145: iload 6
    //   147: aaload
    //   148: invokeinterface 1658 1 0
    //   153: invokeinterface 1637 1 0
    //   158: invokestatic 1488	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
    //   161: invokevirtual 1469	org/eclipse/core/runtime/SubMonitor:subTask	(Ljava/lang/String;)V
    //   164: aload_0
    //   165: aload 5
    //   167: iload 6
    //   169: aaload
    //   170: aload 4
    //   172: iconst_1
    //   173: invokevirtual 1470	org/eclipse/core/runtime/SubMonitor:newChild	(I)Lorg/eclipse/core/runtime/SubMonitor;
    //   176: invokespecial 1516	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:scanSource	(Lorg/eclipse/jdt/core/IJavaElement;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   179: aload 4
    //   181: invokestatic 1600	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   184: iinc 6 1
    //   187: iload 6
    //   189: aload 5
    //   191: arraylength
    //   192: if_icmplt -68 -> 124
    //   195: goto +10 -> 205
    //   198: astore 5
    //   200: aload 5
    //   202: invokestatic 1577	org/eclipse/pde/api/tools/internal/provisional/ApiPlugin:log	(Ljava/lang/Throwable;)V
    //   205: aload 4
    //   207: invokestatic 1600	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   210: goto +38 -> 248
    //   213: astore 5
    //   215: aload 5
    //   217: invokestatic 1577	org/eclipse/pde/api/tools/internal/provisional/ApiPlugin:log	(Ljava/lang/Throwable;)V
    //   220: aload 4
    //   222: ifnull +36 -> 258
    //   225: aload 4
    //   227: invokevirtual 1468	org/eclipse/core/runtime/SubMonitor:done	()V
    //   230: goto +28 -> 258
    //   233: astore 7
    //   235: aload 4
    //   237: ifnull +8 -> 245
    //   240: aload 4
    //   242: invokevirtual 1468	org/eclipse/core/runtime/SubMonitor:done	()V
    //   245: aload 7
    //   247: athrow
    //   248: aload 4
    //   250: ifnull +8 -> 258
    //   253: aload 4
    //   255: invokevirtual 1468	org/eclipse/core/runtime/SubMonitor:done	()V
    //   258: return
    // Line number table:
    //   Java source line #975	-> byte code offset #0
    //   Java source line #976	-> byte code offset #7
    //   Java source line #978	-> byte code offset #8
    //   Java source line #981	-> byte code offset #11
    //   Java source line #982	-> byte code offset #29
    //   Java source line #983	-> byte code offset #38
    //   Java source line #984	-> byte code offset #46
    //   Java source line #985	-> byte code offset #52
    //   Java source line #986	-> byte code offset #60
    //   Java source line #988	-> byte code offset #63
    //   Java source line #989	-> byte code offset #79
    //   Java source line #990	-> byte code offset #88
    //   Java source line #984	-> byte code offset #93
    //   Java source line #995	-> byte code offset #107
    //   Java source line #996	-> byte code offset #118
    //   Java source line #997	-> byte code offset #124
    //   Java source line #998	-> byte code offset #138
    //   Java source line #999	-> byte code offset #164
    //   Java source line #1000	-> byte code offset #179
    //   Java source line #996	-> byte code offset #184
    //   Java source line #1004	-> byte code offset #198
    //   Java source line #1005	-> byte code offset #200
    //   Java source line #1008	-> byte code offset #205
    //   Java source line #1009	-> byte code offset #213
    //   Java source line #1010	-> byte code offset #215
    //   Java source line #1013	-> byte code offset #220
    //   Java source line #1014	-> byte code offset #225
    //   Java source line #1012	-> byte code offset #233
    //   Java source line #1013	-> byte code offset #235
    //   Java source line #1014	-> byte code offset #240
    //   Java source line #1016	-> byte code offset #245
    //   Java source line #1013	-> byte code offset #248
    //   Java source line #1014	-> byte code offset #253
    //   Java source line #1017	-> byte code offset #258
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	259	0	this	BaseApiAnalyzer
    //   0	259	1	context	IBuildContext
    //   0	259	2	component	IApiComponent
    //   0	259	3	monitor	IProgressMonitor
    //   9	245	4	localMonitor	SubMonitor
    //   44	55	5	typenames	String[]
    //   116	74	5	roots	org.eclipse.jdt.core.IPackageFragmentRoot[]
    //   198	3	5	jme	JavaModelException
    //   213	3	5	e	CoreException
    //   47	50	6	i	int
    //   119	69	6	i	int
    //   233	13	7	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   107	195	198	org/eclipse/jdt/core/JavaModelException
    //   11	210	213	org/eclipse/core/runtime/CoreException
    //   11	220	233	finally
  }
  
  /* Error */
  private void scanSource(org.eclipse.jdt.core.IJavaElement element, IProgressMonitor monitor)
    throws JavaModelException
  {
    // Byte code:
    //   0: aload_1
    //   1: invokeinterface 1645 1 0
    //   6: tableswitch	default:+89->95, 3:+26->32, 4:+26->32, 5:+74->80
    //   32: aload_1
    //   33: checkcast 789	org/eclipse/jdt/core/IParent
    //   36: astore_3
    //   37: aload_3
    //   38: invokeinterface 1659 1 0
    //   43: astore 4
    //   45: iconst_0
    //   46: istore 5
    //   48: goto +21 -> 69
    //   51: aload_0
    //   52: aload 4
    //   54: iload 5
    //   56: aaload
    //   57: aload_2
    //   58: invokespecial 1516	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:scanSource	(Lorg/eclipse/jdt/core/IJavaElement;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   61: aload_2
    //   62: iconst_0
    //   63: invokestatic 1601	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   66: iinc 5 1
    //   69: iload 5
    //   71: aload 4
    //   73: arraylength
    //   74: if_icmplt -23 -> 51
    //   77: goto +40 -> 117
    //   80: aload_1
    //   81: checkcast 784	org/eclipse/jdt/core/ICompilationUnit
    //   84: astore_3
    //   85: aload_0
    //   86: aload_3
    //   87: invokespecial 1506	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:processType	(Lorg/eclipse/jdt/core/ICompilationUnit;)V
    //   90: aload_2
    //   91: iconst_0
    //   92: invokestatic 1601	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   95: goto +22 -> 117
    //   98: astore 6
    //   100: aload_2
    //   101: ifnull +13 -> 114
    //   104: aload_2
    //   105: invokestatic 1600	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   108: aload_2
    //   109: invokeinterface 1640 1 0
    //   114: aload 6
    //   116: athrow
    //   117: aload_2
    //   118: ifnull +13 -> 131
    //   121: aload_2
    //   122: invokestatic 1600	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   125: aload_2
    //   126: invokeinterface 1640 1 0
    //   131: return
    // Line number table:
    //   Java source line #1027	-> byte code offset #0
    //   Java source line #1030	-> byte code offset #32
    //   Java source line #1031	-> byte code offset #37
    //   Java source line #1032	-> byte code offset #45
    //   Java source line #1033	-> byte code offset #51
    //   Java source line #1034	-> byte code offset #61
    //   Java source line #1032	-> byte code offset #66
    //   Java source line #1036	-> byte code offset #77
    //   Java source line #1039	-> byte code offset #80
    //   Java source line #1040	-> byte code offset #85
    //   Java source line #1041	-> byte code offset #90
    //   Java source line #1044	-> byte code offset #95
    //   Java source line #1046	-> byte code offset #98
    //   Java source line #1047	-> byte code offset #100
    //   Java source line #1048	-> byte code offset #104
    //   Java source line #1049	-> byte code offset #108
    //   Java source line #1051	-> byte code offset #114
    //   Java source line #1047	-> byte code offset #117
    //   Java source line #1048	-> byte code offset #121
    //   Java source line #1049	-> byte code offset #125
    //   Java source line #1052	-> byte code offset #131
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	132	0	this	BaseApiAnalyzer
    //   0	132	1	element	org.eclipse.jdt.core.IJavaElement
    //   0	132	2	monitor	IProgressMonitor
    //   36	2	3	parent	org.eclipse.jdt.core.IParent
    //   84	3	3	unit	ICompilationUnit
    //   43	29	4	children	org.eclipse.jdt.core.IJavaElement[]
    //   46	24	5	i	int
    //   98	17	6	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	98	98	finally
  }
  
  private void processType(String typename)
  {
    try
    {
      IType type = fJavaProject.findType(typename);
      if ((type != null) && (!type.isMember()))
      {
        ICompilationUnit cunit = type.getCompilationUnit();
        if (cunit != null) {
          processType(cunit);
        }
      }
    }
    catch (JavaModelException e)
    {
      e.printStackTrace();
    }
  }
  
  private void processType(ICompilationUnit cunit)
  {
    TagValidator tv = new TagValidator(cunit);
    CompilationUnit comp = createAST(cunit, 0);
    if (comp == null) {
      return;
    }
    comp.accept(tv);
    IApiProblem[] tagProblems = tv.getTagProblems();
    for (int i = 0; i < tagProblems.length; i++) {
      addProblem(tagProblems[i]);
    }
  }
  
  /* Error */
  private void checkApiUsage(IBuildContext context, IApiComponent component, IProgressMonitor monitor)
    throws CoreException
  {
    // Byte code:
    //   0: aload_0
    //   1: invokespecial 1494	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:ignoreApiUsageScan	()Z
    //   4: ifeq +19 -> 23
    //   7: getstatic 1381	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:DEBUG	Z
    //   10: ifeq +12 -> 22
    //   13: getstatic 1378	java/lang/System:out	Ljava/io/PrintStream;
    //   16: ldc_w 692
    //   19: invokevirtual 1413	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   22: return
    //   23: aconst_null
    //   24: astore 4
    //   26: aload_1
    //   27: invokeinterface 1681 1 0
    //   32: ifeq +36 -> 68
    //   35: aload_0
    //   36: aload_1
    //   37: invokevirtual 1513	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:getApiUseTypes	(Lorg/eclipse/pde/api/tools/internal/provisional/builder/IBuildContext;)[Ljava/lang/String;
    //   40: astore 5
    //   42: aload 5
    //   44: arraylength
    //   45: iconst_1
    //   46: if_icmpge +10 -> 56
    //   49: aload_3
    //   50: invokeinterface 1640 1 0
    //   55: return
    //   56: aload_0
    //   57: aload_2
    //   58: aload 5
    //   60: invokespecial 1529	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:getSearchScope	(Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiComponent;[Ljava/lang/String;)Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiTypeContainer;
    //   63: astore 4
    //   65: goto +11 -> 76
    //   68: aload_0
    //   69: aload_2
    //   70: aconst_null
    //   71: invokespecial 1529	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:getSearchScope	(Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiComponent;[Ljava/lang/String;)Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiTypeContainer;
    //   74: astore 4
    //   76: aload_3
    //   77: getstatic 1401	org/eclipse/pde/api/tools/internal/builder/BuilderMessages:checking_api_usage	Ljava/lang/String;
    //   80: iconst_1
    //   81: anewarray 756	java/lang/String
    //   84: dup
    //   85: iconst_0
    //   86: aload_2
    //   87: invokeinterface 1702 1 0
    //   92: aastore
    //   93: invokestatic 1407	com/ibm/icu/text/MessageFormat:format	(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;
    //   96: iconst_2
    //   97: invokestatic 1472	org/eclipse/core/runtime/SubMonitor:convert	(Lorg/eclipse/core/runtime/IProgressMonitor;Ljava/lang/String;I)Lorg/eclipse/core/runtime/SubMonitor;
    //   100: astore 5
    //   102: new 811	org/eclipse/pde/api/tools/internal/builder/ReferenceAnalyzer
    //   105: dup
    //   106: invokespecial 1553	org/eclipse/pde/api/tools/internal/builder/ReferenceAnalyzer:<init>	()V
    //   109: astore 6
    //   111: invokestatic 1446	java/lang/System:currentTimeMillis	()J
    //   114: lstore 7
    //   116: aload 6
    //   118: aload_2
    //   119: aload 4
    //   121: aload 5
    //   123: iconst_2
    //   124: invokevirtual 1470	org/eclipse/core/runtime/SubMonitor:newChild	(I)Lorg/eclipse/core/runtime/SubMonitor;
    //   127: invokevirtual 1554	org/eclipse/pde/api/tools/internal/builder/ReferenceAnalyzer:analyze	(Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiComponent;Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiTypeContainer;Lorg/eclipse/core/runtime/IProgressMonitor;)[Lorg/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem;
    //   130: astore 9
    //   132: aload 5
    //   134: invokestatic 1600	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   137: invokestatic 1446	java/lang/System:currentTimeMillis	()J
    //   140: lstore 10
    //   142: getstatic 1381	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:DEBUG	Z
    //   145: ifeq +48 -> 193
    //   148: getstatic 1378	java/lang/System:out	Ljava/io/PrintStream;
    //   151: new 757	java/lang/StringBuffer
    //   154: dup
    //   155: ldc_w 675
    //   158: invokespecial 1440	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   161: lload 10
    //   163: lload 7
    //   165: lsub
    //   166: invokevirtual 1443	java/lang/StringBuffer:append	(J)Ljava/lang/StringBuffer;
    //   169: ldc_w 669
    //   172: invokevirtual 1445	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   175: aload 9
    //   177: arraylength
    //   178: invokevirtual 1442	java/lang/StringBuffer:append	(I)Ljava/lang/StringBuffer;
    //   181: ldc_w 670
    //   184: invokevirtual 1445	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   187: invokevirtual 1439	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   190: invokevirtual 1413	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   193: iconst_0
    //   194: istore 12
    //   196: goto +16 -> 212
    //   199: aload_0
    //   200: aload 9
    //   202: iload 12
    //   204: aaload
    //   205: invokespecial 1508	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:addProblem	(Lorg/eclipse/pde/api/tools/internal/provisional/problems/IApiProblem;)Z
    //   208: pop
    //   209: iinc 12 1
    //   212: iload 12
    //   214: aload 9
    //   216: arraylength
    //   217: if_icmplt -18 -> 199
    //   220: aload 5
    //   222: invokestatic 1600	org/eclipse/pde/api/tools/internal/util/Util:updateMonitor	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   225: goto +44 -> 269
    //   228: astore 7
    //   230: getstatic 1381	org/eclipse/pde/api/tools/internal/builder/BaseApiAnalyzer:DEBUG	Z
    //   233: ifeq +8 -> 241
    //   236: aload 7
    //   238: invokestatic 1577	org/eclipse/pde/api/tools/internal/provisional/ApiPlugin:log	(Ljava/lang/Throwable;)V
    //   241: aload_3
    //   242: ifnull +37 -> 279
    //   245: aload_3
    //   246: invokeinterface 1640 1 0
    //   251: goto +28 -> 279
    //   254: astore 13
    //   256: aload_3
    //   257: ifnull +9 -> 266
    //   260: aload_3
    //   261: invokeinterface 1640 1 0
    //   266: aload 13
    //   268: athrow
    //   269: aload_3
    //   270: ifnull +9 -> 279
    //   273: aload_3
    //   274: invokeinterface 1640 1 0
    //   279: return
  
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