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

else
      {
        for (Iterator iter = fUnusedFilters.keySet().iterator(); iter.hasNext();)
        {
          set = (Set)fUnusedFilters.get(iter.next());
          if (set != null) {
            unused.addAll(set);
          }
        }
      }
      int size = unused.size();
      if (size == 0) {
        return NO_FILTERS;
      }
      return (IApiProblemFilter[])unused.toArray(new IApiProblemFilter[size]);
    }
    return NO_FILTERS;
  }
  
  private void collectFilterFor(Set filters, String typename, Set collector, int[] categories)
  {
    ApiProblemFilter filter = null;
    for (Iterator iter = filters.iterator(); iter.hasNext();)
    {
      filter = (ApiProblemFilter)iter.next();
      IApiProblem underlyingProblem = filter.getUnderlyingProblem();
      if ((underlyingProblem != null) && 
        (!matchesCategory(underlyingProblem, categories)))
      {
        String underlyingTypeName = underlyingProblem.getTypeName();
        if ((underlyingTypeName != null) && ((typename == null) || (underlyingTypeName.equals(typename)))) {
          collector.add(filter);
        }
      }
    }
  }
  
  private boolean matchesCategory(IApiProblem problem, int[] categories)
  {
    if (categories != null)
    {
      int cat = problem.getCategory();
      for (int i = 0; i < categories.length; i++) {
        if (cat == categories[i]) {
          return true;
        }
      }
    }
    return false;
  }
  
  public String toString()
  {
    return "API filter store for component: " + fProject.getElementName();
  }
  
  /* Error */
  public void resourceChanged(org.eclipse.core.resources.IResourceChangeEvent event)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 582	org/eclipse/pde/api/tools/internal/ApiFilterStore:fTriggeredChange	Z
    //   4: ifeq +24 -> 28
    //   7: aload_0
    //   8: iconst_0
    //   9: putfield 582	org/eclipse/pde/api/tools/internal/ApiFilterStore:fTriggeredChange	Z
    //   12: getstatic 580	org/eclipse/pde/api/tools/internal/ApiFilterStore:DEBUG	Z
    //   15: ifeq +12 -> 27
    //   18: getstatic 579	java/lang/System:out	Ljava/io/PrintStream;
    //   21: ldc_w 302
    //   24: invokevirtual 590	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   27: return
    //   28: aload_1
    //   29: invokeinterface 689 1 0
    //   34: iconst_1
    //   35: if_icmpne +309 -> 344
    //   38: aload_0
    //   39: iconst_1
    //   40: invokevirtual 631	org/eclipse/pde/api/tools/internal/ApiFilterStore:getFilterFilePath	(Z)Lorg/eclipse/core/runtime/IPath;
    //   43: astore_2
    //   44: aload_1
    //   45: invokeinterface 690 1 0
    //   50: aload_2
    //   51: invokeinterface 694 2 0
    //   56: astore_3
    //   57: aload_3
    //   58: ifnonnull +4 -> 62
    //   61: return
    //   62: iconst_0
    //   63: istore 4
    //   65: aload_3
    //   66: invokeinterface 692 1 0
    //   71: iconst_2
    //   72: if_icmpne +51 -> 123
    //   75: getstatic 580	org/eclipse/pde/api/tools/internal/ApiFilterStore:DEBUG	Z
    //   78: ifeq +12 -> 90
    //   81: getstatic 579	java/lang/System:out	Ljava/io/PrintStream;
    //   84: ldc_w 313
    //   87: invokevirtual 590	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   90: aload_0
    //   91: getfield 583	org/eclipse/pde/api/tools/internal/ApiFilterStore:fFilterMap	Ljava/util/HashMap;
    //   94: ifnull +210 -> 304
    //   97: aload_0
    //   98: getfield 583	org/eclipse/pde/api/tools/internal/ApiFilterStore:fFilterMap	Ljava/util/HashMap;
    //   101: invokevirtual 612	java/util/HashMap:clear	()V
    //   104: aload_0
    //   105: getfield 585	org/eclipse/pde/api/tools/internal/ApiFilterStore:fProject	Lorg/eclipse/jdt/core/IJavaProject;
    //   108: invokeinterface 704 1 0
    //   113: invokeinterface 680 1 0
    //   118: istore 4
    //   120: goto +184 -> 304
    //   123: aload_3
    //   124: invokeinterface 692 1 0
    //   129: iconst_1
    //   130: if_icmpeq +29 -> 159
    //   133: aload_3
    //   134: invokeinterface 691 1 0
    //   139: sipush 256
    //   142: iand
    //   143: ifne +16 -> 159
    //   146: aload_3
    //   147: invokeinterface 691 1 0
    //   152: ldc_w 290
    //   155: iand
    //   156: ifeq +148 -> 304
    //   159: getstatic 580	org/eclipse/pde/api/tools/internal/ApiFilterStore:DEBUG	Z
    //   162: ifeq +12 -> 174
    //   165: getstatic 579	java/lang/System:out	Ljava/io/PrintStream;
    //   168: ldc_w 314
    //   171: invokevirtual 590	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   174: aload_3
    //   175: invokeinterface 693 1 0
    //   180: astore 5
    //   182: aload 5
    //   184: ifnull +120 -> 304
    //   187: aload 5
    //   189: invokeinterface 684 1 0
    //   194: iconst_1
    //   195: if_icmpne +109 -> 304
    //   198: getstatic 580	org/eclipse/pde/api/tools/internal/ApiFilterStore:DEBUG	Z
    //   201: ifeq +38 -> 239
    //   204: getstatic 579	java/lang/System:out	Ljava/io/PrintStream;
    //   207: new 332	java/lang/StringBuffer
    //   210: dup
    //   211: ldc_w 312
    //   214: invokespecial 601	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   217: aload 5
    //   219: invokeinterface 686 1 0
    //   224: invokevirtual 603	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   227: ldc_w 295
    //   230: invokevirtual 603	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   233: invokevirtual 600	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   236: invokevirtual 590	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   239: aload 5
    //   241: checkcast 344	org/eclipse/core/resources/IFile
    //   244: astore 6
    //   246: aload 6
    //   248: invokeinterface 678 1 0
    //   253: ifeq +51 -> 304
    //   256: aload_0
    //   257: invokespecial 628	org/eclipse/pde/api/tools/internal/ApiFilterStore:clearFilters	()V
    //   260: aload_0
    //   261: invokespecial 629	org/eclipse/pde/api/tools/internal/ApiFilterStore:initializeApiFilters	()V
    //   264: goto +24 -> 288
    //   267: astore 7
    //   269: aload_0
    //   270: getfield 585	org/eclipse/pde/api/tools/internal/ApiFilterStore:fProject	Lorg/eclipse/jdt/core/IJavaProject;
    //   273: invokeinterface 704 1 0
    //   278: invokeinterface 680 1 0
    //   283: istore 4
    //   285: aload 7
    //   287: athrow
    //   288: aload_0
    //   289: getfield 585	org/eclipse/pde/api/tools/internal/ApiFilterStore:fProject	Lorg/eclipse/jdt/core/IJavaProject;
    //   292: invokeinterface 704 1 0
    //   297: invokeinterface 680 1 0
    //   302: istore 4
    //   304: iload 4
    //   306: ifeq +38 -> 344
    //   309: invokestatic 620	org/eclipse/core/resources/ResourcesPlugin:getWorkspace	()Lorg/eclipse/core/resources/IWorkspace;
    //   312: invokeinterface 695 1 0
    //   317: ifne +27 -> 344
    //   320: iconst_1
    //   321: anewarray 345	org/eclipse/core/resources/IProject
    //   324: dup
    //   325: iconst_0
    //   326: aload_0
    //   327: getfield 585	org/eclipse/pde/api/tools/internal/ApiFilterStore:fProject	Lorg/eclipse/jdt/core/IJavaProject;
    //   330: invokeinterface 704 1 0
    //   335: aastore
    //   336: bipush 10
    //   338: invokestatic 650	org/eclipse/pde/api/tools/internal/util/Util:getBuildJob	([Lorg/eclipse/core/resources/IProject;I)Lorg/eclipse/core/runtime/jobs/Job;
    //   341: invokevirtual 627	org/eclipse/core/runtime/jobs/Job:schedule	()V
    //   344: return
    // Line number table:
    //   Java source line #893	-> byte code offset #0
    //   Java source line #897	-> byte code offset #7
    //   Java source line #898	-> byte code offset #12
    //   Java source line #899	-> byte code offset #18
    //   Java source line #901	-> byte code offset #27
    //   Java source line #903	-> byte code offset #28
    //   Java source line #904	-> byte code offset #38
    //   Java source line #905	-> byte code offset #44
    //   Java source line #906	-> byte code offset #57
    //   Java source line #907	-> byte code offset #61
    //   Java source line #909	-> byte code offset #62
    //   Java source line #910	-> byte code offset #65
    //   Java source line #911	-> byte code offset #75
    //   Java source line #912	-> byte code offset #81
    //   Java source line #914	-> byte code offset #90
    //   Java source line #915	-> byte code offset #97
    //   Java source line #916	-> byte code offset #104
    //   Java source line #919	-> byte code offset #123
    //   Java source line #920	-> byte code offset #133
    //   Java source line #921	-> byte code offset #146
    //   Java source line #922	-> byte code offset #159
    //   Java source line #923	-> byte code offset #165
    //   Java source line #925	-> byte code offset #174
    //   Java source line #926	-> byte code offset #182
    //   Java source line #927	-> byte code offset #198
    //   Java source line #928	-> byte code offset #204
    //   Java source line #930	-> byte code offset #239
    //   Java source line #931	-> byte code offset #246
    //   Java source line #933	-> byte code offset #256
    //   Java source line #934	-> byte code offset #260
    //   Java source line #936	-> byte code offset #267
    //   Java source line #937	-> byte code offset #269
    //   Java source line #938	-> byte code offset #285
    //   Java source line #937	-> byte code offset #288
    //   Java source line #942	-> byte code offset #304
    //   Java source line #943	-> byte code offset #320
    //   Java source line #946	-> byte code offset #344
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	345	0	this	ApiFilterStore
    //   0	345	1	event	org.eclipse.core.resources.IResourceChangeEvent
    //   43	8	2	path	IPath
    //   56	119	3	leafdelta	org.eclipse.core.resources.IResourceDelta
    //   63	242	4	needsbuild	boolean
    //   180	60	5	resource	IResource
    //   244	3	6	file	org.eclipse.core.resources.IFile
    //   267	19	7	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   256	267	267	finally
  }
  
  private synchronized void clearFilters()
  {
    if (fFilterMap != null)
    {
      fFilterMap.clear();
      fFilterMap = null;
    }
  }
}

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

import java.util.HashMap;
import java.util.Set;
import org.eclipse.core.runtime.Assert;
import org.eclipse.pde.api.tools.internal.provisional.IApiJavadocTag;

public class ApiJavadocTag
  implements IApiJavadocTag
{
  private String fId = null;
  private String fName = null;
  private HashMap fTagItems = null;
  private static String EMPTY_STRING = "";
  private int fRModifier = 0;
  private String fTaglabel = null;
  
  public ApiJavadocTag(String id, String name, int rmodifier)
  {
    Assert.isNotNull(id);
    fId = id;
    Assert.isNotNull(name);
    fName = name;
    fRModifier = rmodifier;
  }
  
  public String getTagId()
  {
    return fId;
  }
  
  public int getRestrictionModifier()
  {
    return fRModifier;
  }
  
  public void setApplicableTo(int type, int member, String comment)
  {
    if (fTagItems == null) {
      fTagItems = new HashMap(6);
    }
    fTagItems.put(getTagKey(type, member), comment);
  }
  
  public String getTagComment(int type, int member)
  {
    if (fTagItems == null) {
      return EMPTY_STRING;
    }
    Object obj = fTagItems.get(getTagKey(type, member));
    return (String)(obj == null ? EMPTY_STRING : obj);
  }
  
  public String getTagName()
  {
    if (fTaglabel == null)
    {
      StringBuffer tag = new StringBuffer();
      tag.append("@");
      tag.append(fName);
      fTaglabel = tag.toString();
    }
    return fTaglabel;
  }
  
  public String toString()
  {
    return getTagName();
  }
  
  public String getCompleteTag(int type, int member)
  {
    StringBuffer tag = new StringBuffer();
    tag.append(getTagName());
    String comment = getTagComment(type, member);
    if (EMPTY_STRING.equals(comment)) {
      return tag.toString();
    }
    tag.append(" ");
    tag.append(comment);
    return tag.toString();
  }
  
  public boolean isApplicable(int type, int member)
  {
    return (fTagItems != null) && (fTagItems.keySet().contains(getTagKey(type, member)));
  }
  
  public boolean equals(Object obj)
  {
    if ((obj instanceof IApiJavadocTag)) {
      return ((IApiJavadocTag)obj).getTagName().equals(getTagName());
    }
    if ((obj instanceof String)) {
      return ((String)obj).equals(getTagName());
    }
    return false;
  }
  
  public int hashCode()
  {
    return getTagName().hashCode();
  }
  
  private Integer getTagKey(int type, int member)
  {
    return new Integer((type | member) + hashCode());
  }
}

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

import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;

public class ApiPluginPreferenceInitializer
  extends AbstractPreferenceInitializer
{
  public void initializeDefaultPreferences()
  {
    IEclipsePreferences node = DefaultScope.INSTANCE.getNode("org.eclipse.pde.api.tools");
    if (node == null) {
      return;
    }
    node.put("ILLEGAL_EXTEND", "Warning");
    node.put("ILLEGAL_IMPLEMENT", "Warning");
    node.put("ILLEGAL_INSTANTIATE", "Warning");
    node.put("ILLEGAL_REFERENCE", "Warning");
    node.put("ILLEGAL_OVERRIDE", "Warning");
    node.put("LEAK_EXTEND", "Warning");
    node.put("LEAK_FIELD_DECL", "Warning");
    node.put("LEAK_IMPLEMENT", "Warning");
    node.put("LEAK_METHOD_PARAM", "Warning");
    node.put("LEAK_METHOD_RETURN_TYPE", "Warning");
    node.put("INVALID_JAVADOC_TAG", "Ignore");
    node.put("INVALID_REFERENCE_IN_SYSTEM_LIBRARIES", "Ignore");
    node.put("UNUSED_PROBLEM_FILTERS", "Warning");
    node.put("fatal_problems", "Error");
    
    int i = 0;
    for (int max = ApiPlugin.AllCompatibilityKeys.length; i < max; i++) {
      node.put(ApiPlugin.AllCompatibilityKeys[i], "Error");
    }
    node.put("report_api_breakage_when_major_version_incremented", "Disabled");
    
    node.put("missing_since_tag", "Error");
    node.put("malformed_since_tag", "Error");
    node.put("invalid_since_tag_version", "Error");
    node.put("incompatible_api_component_version", "Error");
    node.put("incompatible_api_component_version_include_minor_without_api_change", "Disabled");
    node.put("incompatible_api_component_version_include_major_without_breaking_change", "Disabled");
    
    node.put("missing_default_api_profile", "Error");
    
    node.put("report_resolution_errors_api_component", "Warning");
    node.putBoolean("automatically_removed_unused_problem_filters", false);
    
    node.put("API_USE_SCAN_TYPE_SEVERITY", "Error");
    node.put("API_USE_SCAN_METHOD_SEVERITY", "Error");
    node.put("API_USE_SCAN_FIELD_SEVERITY", "Error");
  }
}

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

import org.eclipse.osgi.service.resolver.VersionRange;
import org.eclipse.pde.api.tools.internal.provisional.IVersionRange;
import org.osgi.framework.Version;

public class BundleVersionRange
  implements IVersionRange
{
  private VersionRange fRange;
  
  public BundleVersionRange(String versionInterval)
  {
    fRange = new VersionRange(versionInterval);
  }
  
  public BundleVersionRange(VersionRange range)
  {
    fRange = range;
  }
  
  public String getMaximumVersion()
  {
    return fRange.getMaximum().toString();
  }
  
  public String getMinimumVersion()
  {
    return fRange.getMinimum().toString();
  }
  
  public boolean isIncludeMaximum()
  {
    return fRange.getIncludeMaximum();
  }
  
  public boolean isIncludeMinimum()
  {
    return fRange.getIncludeMinimum();
  }
  
  public boolean equals(Object obj)
  {
    if ((obj instanceof BundleVersionRange))
    {
      BundleVersionRange range = (BundleVersionRange)obj;
      return fRange.equals(fRange);
    }
    return false;
  }
  
  public int hashCode()
  {
    return fRange.hashCode();
  }
  
  public String toString()
  {
    return fRange.toString();
  }
  
  public boolean isIncluded(String version)
  {
    return fRange.isIncluded(new Version(version));
  }
}

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

import java.util.zip.CRC32;
import org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor;
import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IFieldDescriptor;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IMethodDescriptor;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IReferenceTypeDescriptor;

public class CRCVisitor
  extends ApiDescriptionVisitor
{
  private CRC32 fCrc = new CRC32();
  
  public boolean visitElement(IElementDescriptor element, IApiAnnotations description)
  {
    String signature = null;
    String name = null;
    switch (element.getElementType())
    {
    case 2: 
      signature = ((IReferenceTypeDescriptor)element).getSignature();
      break;
    case 6: 
      signature = ((IMethodDescriptor)element).getSignature();
      name = ((IMethodDescriptor)element).getName();
      break;
    case 5: 
      name = ((IFieldDescriptor)element).getName();
      break;
    }
    if (signature != null) {
      fCrc.update(signature.getBytes());
    }
    if (name != null) {
      fCrc.update(name.getBytes());
    }
    fCrc.update(description.getRestrictions());
    fCrc.update(description.getVisibility());
    return true;
  }
  
  public long getValue()
  {
    return fCrc.getValue();
  }
}

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

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.InputStream;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.jdt.core.ICompilationUnit;

public class CompilationUnit
{
  private String name = null;
  private String filepath = null;
  private ICompilationUnit unit = null;
  
  public CompilationUnit(String filepath)
  {
    File file = new File(filepath);
    if (!file.exists()) {
      throw new IllegalArgumentException("The specified path is not an existing file");
    }
    this.filepath = filepath;
    name = file.getName();
  }
  
  public CompilationUnit(ICompilationUnit compilationUnit)
  {
    unit = compilationUnit;
    name = compilationUnit.getElementName();
  }
  
  public String getName()
  {
    return name;
  }
  
  public InputStream getInputStream()
    throws FileNotFoundException
  {
    if (unit != null) {
      try
      {
        return ((IFile)unit.getCorrespondingResource()).getContents();
      }
      catch (CoreException e)
      {
        throw new FileNotFoundException(e.getStatus().getMessage());
      }
    }
    return new FileInputStream(new File(filepath));
  }
  
  public String toString()
  {
    return getName();
  }
}

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

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.pde.api.tools.internal.provisional.ApiDescriptionVisitor;
import org.eclipse.pde.api.tools.internal.provisional.IApiAccess;
import org.eclipse.pde.api.tools.internal.provisional.IApiAnnotations;
import org.eclipse.pde.api.tools.internal.provisional.IApiDescription;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor;

public class CompositeApiDescription
  implements IApiDescription
{
  private IApiDescription[] fDescriptions;
  
  public CompositeApiDescription(IApiDescription[] descriptions)
  {
    fDescriptions = descriptions;
  }
  
  public void accept(ApiDescriptionVisitor visitor, IProgressMonitor monitor)
  {
    for (int i = 0; i < fDescriptions.length; i++) {
      fDescriptions[i].accept(visitor, monitor);
    }
  }
  
  public boolean accept(ApiDescriptionVisitor visitor, IElementDescriptor element, IProgressMonitor monitor)
  {
    for (int i = 0; i < fDescriptions.length; i++) {
      if (fDescriptions[i].accept(visitor, element, monitor)) {
        return true;
      }
    }
    return false;
  }
  
  public IApiAnnotations resolveAnnotations(IElementDescriptor element)
  {
    for (int i = 0; i < fDescriptions.length; i++)
    {
      IApiAnnotations ann = fDescriptions[i].resolveAnnotations(element);
      if (ann != null) {
        return ann;
      }
    }
    return null;
  }
  
  public IStatus setRestrictions(IElementDescriptor element, int restrictions)
  {
    for (int i = 0; i < fDescriptions.length; i++)
    {
      IStatus status = fDescriptions[i].setRestrictions(element, restrictions);
      if ((status.isOK()) || (i == fDescriptions.length - 1)) {
        return status;
      }
    }
    return Status.CANCEL_STATUS;
  }
  
  public IStatus setAddedProfile(IElementDescriptor element, int addedProfile)
  {
    return Status.OK_STATUS;
  }
  
  public IStatus setRemovedProfile(IElementDescriptor element, int removedProfile)
  {
    return Status.OK_STATUS;
  }
  
  public IStatus setSuperclass(IElementDescriptor element, String superclass)
  {
    return Status.OK_STATUS;
  }
  
  public IStatus setSuperinterfaces(IElementDescriptor element, String superinterfaces)
  {
    return Status.OK_STATUS;
  }
  
  public IStatus setInterface(IElementDescriptor element, boolean interfaceFlag)
  {
    return Status.OK_STATUS;
  }
  
  public IStatus setVisibility(IElementDescriptor element, int visibility)
  {
    for (int i = 0; i < fDescriptions.length; i++)
    {
      IStatus status = fDescriptions[i].setVisibility(element, visibility);
      if ((status.isOK()) || (i == fDescriptions.length - 1)) {
        return status;
      }
    }
    return Status.CANCEL_STATUS;
  }
  
  public void setAccessLevel(IElementDescriptor element, IPackageDescriptor pelement, int access) {}
  
  public IApiAccess resolveAccessLevel(IElementDescriptor element, IPackageDescriptor pelement)
  {
    IApiAccess access = null;
    for (int i = 0; i < fDescriptions.length; i++)
    {
      access = fDescriptions[i].resolveAccessLevel(element, pelement);
      if (access != null) {
        return access;
      }
    }
    return null;
  }
}

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

import org.eclipse.osgi.util.NLS;

public class CoreMessages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.pde.api.tools.internal.coremessages";
  public static String ApiBaseline_0;
  public static String ApiBaseline_1;
  public static String ApiBaseline_2;
  public static String ApiBaseline_3;
  public static String ApiBaseline_4;
  public static String ApiBaseline_5;
  public static String ProjectComponent_could_not_locate_model;
  
  static
  {
    NLS.initializeMessages("org.eclipse.pde.api.tools.internal.coremessages", CoreMessages.class);
  }
}

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

public abstract interface IApiCoreConstants
{
  public static final String COMPONENT_XML_NAME = "component.xml";
  public static final String UTF_8 = "UTF-8";
  public static final String PLUGIN_XML_NAME = "plugin.xml";
  public static final String FRAGMENT_XML_NAME = "fragment.xml";
  public static final String API_DESCRIPTION_XML_NAME = ".api_description";
  public static final String SYSTEM_API_DESCRIPTION_XML_NAME = "system.api_description";
  public static final String API_FILTERS_XML_NAME = ".api_filters";
  public static final String ECLIPSE_SOURCE_BUNDLE = "Eclipse-SourceBundle";
  public static final String ANT_BUILD_PROFILE_NAME = "ant_build_profile";
  public static final String API_USE_SCAN_LOCATION = "API_USE_SCAN_LOCATION";
  public static final String XML = "xml";
}

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

public abstract interface IApiXmlConstants
{
  public static final String API_DESCRIPTION_CURRENT_VERSION = "1.2";
  public static final String API_FILTER_STORE_CURRENT_VERSION = Integer.toString(2);
  public static final String API_PROFILE_CURRENT_VERSION = "2";
  public static final String API_REPORT_CURRENT_VERSION = "1";
  public static final String ATTR_CATEGORY = "category";
  public static final String ATTR_ELEMENT_KIND = "elementkind";
  public static final String ATTR_COMMENT = "comment";
  public static final String ATTR_SEVERITY = "severity";
  public static final String ATTR_EXTEND = "extend";
  public static final String ATTR_OVERRIDE = "override";
  public static final String ATTR_SUBCLASS = "subclass";
  public static final String ATTR_FLAGS = "flags";
  public static final String ATTR_HANDLE = "handle";
  public static final String ATTR_ID = "id";
  public static final String ATTR_IMPLEMENT = "implement";
  public static final String ATTR_INSTANTIATE = "instantiate";
  public static final String ATTR_KIND = "kind";
  public static final String ATTR_LOCATION = "location";
  public static final String ATTR_MESSAGE = "message";
  public static final String ATTR_MODIFICATION_STAMP = "modificationStamp";
  public static final String ATTR_NAME = "name";
  public static final String ATTR_NAME_COMPATIBLE = "compatible";
  public static final String ATTR_NAME_ELEMENT_TYPE = "element_type";
  public static final String ATTR_CHAR_START = "charstart";
  public static final String ATTR_CHAR_END = "charend";
  public static final String ATTR_NAME_NEW_MODIFIERS = "newModifiers";
  public static final String ATTR_NAME_OLD_MODIFIERS = "oldModifiers";
  public static final String ATTR_NAME_TYPE_NAME = "type_name";
  public static final String ATTR_LINE_NUMBER = "linenumber";
  public static final String ATTR_MESSAGE_ARGUMENTS = "messageargs";
  public static final String ATTR_PATH = "path";
  public static final String ATTR_REFERENCE = "reference";
  public static final String ATTR_RESTRICTIONS = "restrictions";
  public static final String ATTR_ADDED_PROFILE = "addedprofile";
  public static final String ATTR_PROFILE = "profile";
  public static final String ATTR_REMOVED_PROFILE = "removedprofile";
  public static final String ATTR_SUPER_CLASS = "sc";
  public static final String ATTR_SUPER_INTERFACES = "sis";
  public static final String ATTR_INTERFACE = "int";
  public static final String ATTR_STATUS = "status";
  public static final String ATTR_NAME_COMPONENT_ID = "componentId";
  public static final String ATTR_SIGNATURE = "signature";
  public static final String ATTR_VERSION = "version";
  public static final String ATTR_VISIBILITY = "visibility";
  public static final String DELTA_ELEMENT_NAME = "delta";
  public static final String DELTAS_ELEMENT_NAME = "deltas";
  public static final String ELEMENT_APICOMPONENT = "apicomponent";
  public static final String ELEMENT_APIPROFILE = "apiprofile";
  public static final String ELEMENT_COMPONENT = "component";
  public static final String ELEMENT_COMPONENTS = "components";
  public static final String ELEMENT_FIELD = "field";
  public static final String ELEMENT_FILTER = "filter";
  public static final String ELEMENT_METHOD = "method";
  public static final String ELEMENT_PACKAGE = "package";
  public static final String ELEMENT_PACKAGE_FRAGMENT = "fragment";
  public static final String ELEMENT_PLUGIN = "plugin";
  public static final String ELEMENT_POOL = "pool";
  public static final String ELEMENT_RESOURCE = "resource";
  public static final String ELEMENT_TYPE = "type";
  public static final String ELEMENT_TARGET = "target";
  public static final String ELEMENT_API_PROBLEMS = "api_problems";
  public static final String ELEMENT_API_PROBLEM = "api_problem";
  public static final String ELEMENT_PROBLEM_EXTRA_ARGUMENTS = "extra_arguments";
  public static final String ELEMENT_PROBLEM_EXTRA_ARGUMENT = "extra_argument";
  public static final String ATTR_VALUE = "value";
  public static final String ELEMENT_PROBLEM_MESSAGE_ARGUMENTS = "message_arguments";
  public static final String ELEMENT_PROBLEM_MESSAGE_ARGUMENT = "message_argument";
  public static final String ATTR_COMPONENT_ID = "componentID";
  public static final String ELEMENT_API_TOOL_REPORT = "report";
  public static final String ATTR_KEY = "key";
  public static final String ATTR_TYPE = "type";
  public static final String ATTR_TYPE_NAME = "typeName";
  public static final String ELEMENT_BUNDLE = "bundle";
  public static final String ELEMENT_DELTA_MESSAGE_ARGUMENTS = "message_arguments";
  public static final String ELEMENT_DELTA_MESSAGE_ARGUMENT = "message_argument";
  public static final String REFERENCES = "references";
  public static final String REFERENCE_KIND = "reference_kind";
  public static final String ATTR_REFERENCE_KIND_NAME = "reference_kind_name";
  public static final String ATTR_ORIGIN = "origin";
  public static final String ATTR_REFEREE = "referee";
  public static final String ATTR_REFERENCE_COUNT = "reference_count";
  public static final String ATTR_REFERENCE_VISIBILITY = "reference_visibility";
  public static final String SKIPPED_DETAILS = "details";
  public static final String EXCLUDED = "excluded";
  public static final String ATTR_MEMBER_NAME = "member";
  public static final String ATTR_ALTERNATE = "alternate";
  public static final String ELEMENT_REPORTED_COUNT = "reportedcount";
  public static final String ATTR_TOTAL = "total";
  public static final String ATTR_COUNT_WARNINGS = "warnings";
  public static final String ATTR_COUNT_ERRORS = "errors";
  public static final String ATTR_COUNT_ILLEGAL = "illegal";
  public static final String ATTR_COUNT_INTERNAL = "internal";
}

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

import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.pde.api.tools.internal.provisional.IApiJavadocTag;

public final class JavadocTagManager
{
  private HashMap tagcache = null;
  private IApiJavadocTag[] tags;
  
  private void initializeJavadocTags()
  {
    if (tagcache == null)
    {
      tagcache = new HashMap();
      List list = new ArrayList(4);
      
      ApiJavadocTag newtag = new ApiJavadocTag("org.eclipse.pde.api.tools.noimplement", 
        "noimplement", 
        1);
      newtag.setApplicableTo(2, 
        16, 
        "This interface is not intended to be implemented by clients.");
      tagcache.put(newtag.getTagId(), newtag);
      list.add(newtag);
      
      newtag = new ApiJavadocTag("org.eclipse.pde.api.tools.noextend", 
        "noextend", 
        2);
      newtag.setApplicableTo(1, 
        16, 
        "This class is not intended to be subclassed by clients.");
      newtag.setApplicableTo(2, 
        16, 
        "This interface is not intended to be extended by clients.");
      tagcache.put(newtag.getTagId(), newtag);
      list.add(newtag);
      
      newtag = new ApiJavadocTag("org.eclipse.pde.api.tools.nooverride", 
        "nooverride", 
        16);
      newtag.setApplicableTo(1, 
        4, 
        "This method is not intended to be re-implemented or extended by clients.");
      tagcache.put(newtag.getTagId(), newtag);
      list.add(newtag);
      
      newtag = new ApiJavadocTag("org.eclipse.pde.api.tools.noinstantiate", 
        "noinstantiate", 
        4);
      newtag.setApplicableTo(1, 
        16, 
        "This class is not intended to be instantiated by clients.");
      tagcache.put(newtag.getTagId(), newtag);
      list.add(newtag);
      
      newtag = new ApiJavadocTag("org.eclipse.pde.api.tools.noreference", 
        "noreference", 
        8);
      newtag.setApplicableTo(1, 
        4, 
        "This method is not intended to be referenced by clients.");
      newtag.setApplicableTo(2, 
        4, 
        "This method is not intended to be referenced by clients.");
      newtag.setApplicableTo(1, 
        8, 
        "This field is not intended to be referenced by clients.");
      newtag.setApplicableTo(2, 
        8, 
        "This field is not intended to be referenced by clients.");
      newtag.setApplicableTo(1, 
        32, 
        "This constructor is not intended to be referenced by clients.");
      newtag.setApplicableTo(64, 
        8, 
        "This enum field is not intended to be referenced by clients.");
      newtag.setApplicableTo(64, 
        4, 
        "This enum method is not intended to be referenced by clients.");
      tagcache.put(newtag.getTagId(), newtag);
      list.add(newtag);
      tags = ((IApiJavadocTag[])list.toArray(new IApiJavadocTag[list.size()]));
    }
  }
  
  public synchronized IApiJavadocTag[] getTagsForType(int type, int member)
  {
    initializeJavadocTags();
    List list = new ArrayList();
    for (int i = 0; i < tags.length; i++) {
      if (tags[i].isApplicable(type, member)) {
        list.add(tags[i]);
      }
    }
    return (IApiJavadocTag[])list.toArray(new IApiJavadocTag[list.size()]);
  }
  
  public synchronized IApiJavadocTag getTag(String id)
  {
    initializeJavadocTags();
    return (IApiJavadocTag)tagcache.get(id);
  }
  
  public synchronized IApiJavadocTag[] getAllTags()
  {
    initializeJavadocTags();
    if (tagcache == null) {
      return new IApiJavadocTag[0];
    }
    Collection values = tagcache.values();
    return (IApiJavadocTag[])values.toArray(new IApiJavadocTag[values.size()]);
  }
  
  public synchronized Set getAllTagNames()
  {
    IApiJavadocTag[] tags = getAllTags();
    HashSet names = new HashSet(tags.length);
    for (int i = 0; i < tags.length; i++) {
      names.add(tags[i].getTagName());
    }
    return names;
  }
  
  public synchronized int getRestrictionsForTag(String tagname, int type, int member)
  {
    if (tagname == null) {
      return 0;
    }
    initializeJavadocTags();
    ApiJavadocTag tag = null;
    for (int i = 0; i < tags.length; i++)
    {
      tag = (ApiJavadocTag)tags[i];
      if ((tag.getTagName().equals(tagname)) && (tag.isApplicable(type, member))) {
        return tag.getRestrictionModifier();
      }
    }
    return 0;
  }
}

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

import org.eclipse.jdt.core.IJavaProject;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;

public class NonApiProjectDescription
  extends ProjectApiDescription
{
  public NonApiProjectDescription(IJavaProject project)
  {
    super(project);
  }
  
  protected boolean isInsertOnResolve(IElementDescriptor elementDescriptor)
  {
    switch (elementDescriptor.getElementType())
    {
    case 1: 
      return true;
    }
    return false;
  }
}

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

import org.eclipse.jdt.core.IJavaElement;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.pde.api.tools.internal.provisional.RestrictionModifiers;
import org.eclipse.pde.api.tools.internal.provisional.VisibilityModifiers;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IElementDescriptor;
import org.eclipse.pde.api.tools.internal.provisional.descriptors.IPackageDescriptor;
import org.w3c.dom.Document;
import org.w3c.dom.Element;

class ProjectApiDescription$PackageNode
  extends ApiDescription.ManifestNode
{
  IPackageFragment[] fFragments;
  final ProjectApiDescription this$0;
  
  public ProjectApiDescription$PackageNode(ProjectApiDescription paramProjectApiDescription, IPackageFragment[] fragments, ApiDescription.ManifestNode parent, IElementDescriptor element, int visibility, int restrictions)
  {
    super(paramProjectApiDescription, parent, element, visibility, restrictions);this$0 = paramProjectApiDescription;
    fFragments = fragments;
  }
  
  protected ApiDescription.ManifestNode refresh()
  {
    this$0.refreshPackages();
    for (int i = 0; i < fFragments.length; i++) {
      if (!fFragments[i].exists())
      {
        this$0.modified();
        return null;
      }
    }
    return this;
  }
  
  void persistXML(Document document, Element parent)
  {
    if (hasApiVisibility(this))
    {
      Element pkg = document.createElement("package");
      for (int i = 0; i < fFragments.length; i++)
      {
        Element fragment = document.createElement("fragment");
        fragment.setAttribute("handle", fFragments[i].getHandleIdentifier());
        pkg.appendChild(fragment);
      }
      pkg.setAttribute("visibility", Integer.toString(visibility));
      this$0.persistChildren(document, pkg, children);
      parent.appendChild(pkg);
    }
  }
  
  public String toString()
  {
    StringBuffer buffer = new StringBuffer();
    String name = ((IPackageDescriptor)element).getName();
    buffer.append("Package Node: ").append(name.equals("") ? "<default package>" : name);
    buffer.append("\nVisibility: ").append(VisibilityModifiers.getVisibilityName(visibility));
    buffer.append("\nRestrictions: ").append(RestrictionModifiers.getRestrictionText(restrictions));
    if (fFragments != null)
    {
      buffer.append("\nFragments:");
      IPackageFragment fragment = null;
      for (int i = 0; i < fFragments.length; i++)
      {
        fragment = fFragments[i];
        buffer.append("\n\t").append(fragment.getElementName());
        buffer.append(" [");
        buffer.append(fragment.getParent().getElementName());
        buffer.append("]");
      }
    }
    return buffer.toString();
  }
}

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

import java.io.PrintStream;
import java.util.HashMap;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.IJavaModelStatus;
import org.eclipse.jdt.core.IPackageFragment;
import org.eclipse.jdt.core.IPa
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