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

ryApiComponent(IApiBaseline baseline, ExecutionEnvironmentDescription description, String[] systemPackages)
    throws CoreException
  {
    super(baseline);
    init(description);
    fSystemPackages = systemPackages;
  }
  
  protected IApiDescription createApiDescription()
    throws CoreException
  {
    IApiDescription api = new ApiDescription(getSymbolicName());
    for (int i = 0; i < fSystemPackages.length; i++)
    {
      IPackageDescriptor pkg = Factory.packageDescriptor(fSystemPackages[i]);
      api.setVisibility(pkg, 1);
    }
    String[] packageNames = getPackageNames();
    for (int i = 0; i < packageNames.length; i++) {
      if (packageNames[i].startsWith("java."))
      {
        IPackageDescriptor pkg = Factory.packageDescriptor(packageNames[i]);
        api.setVisibility(pkg, 1);
      }
    }
    return api;
  }
  
  protected IApiFilterStore createApiFilterStore()
  {
    return null;
  }
  
  protected List createApiTypeContainers()
    throws CoreException
  {
    List libs = new ArrayList(fLibraries.length);
    for (int i = 0; i < fLibraries.length; i++)
    {
      LibraryLocation lib = fLibraries[i];
      libs.add(new ArchiveApiTypeContainer(this, lib.getSystemLibraryPath().toOSString()));
    }
    return libs;
  }
  
  public String[] getExecutionEnvironments()
  {
    return fExecEnv;
  }
  
  public String getSymbolicName()
  {
    return fExecEnv[0];
  }
  
  public String getLocation()
  {
    return fLocation;
  }
  
  public IRequiredComponentDescription[] getRequiredComponents()
  {
    return new IRequiredComponentDescription[0];
  }
  
  public String getVersion()
  {
    return fVersion;
  }
  
  private void init(ExecutionEnvironmentDescription description)
    throws CoreException
  {
    fLibraries = description.getLibraryLocations();
    fExecEnv = new String[] { description.getProperty("-Dee.class.library.level") };
    fVersion = fExecEnv[0];
    setName(fExecEnv[0]);
    fLocation = description.getProperty("-Djava.home");
  }
  
  public boolean isSourceComponent()
  {
    return false;
  }
  
  public boolean isSystemComponent()
  {
    return true;
  }
  
  public boolean isFragment()
  {
    return false;
  }
  
  public boolean hasFragments()
  {
    return false;
  }
  
  public String getOrigin()
  {
    return null;
  }
  
  public boolean hasApiDescription()
  {
    return false;
  }
  
  public IApiDescription getSystemApiDescription(int eeValue)
    throws CoreException
  {
    return null;
  }
  
  public String[] getLowestEEs()
  {
    return null;
  }
  
  public ResolverError[] getErrors()
    throws CoreException
  {
    return null;
  }
}

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

import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.MethodAdapter;
import org.objectweb.asm.MethodVisitor;

class TypeStructureBuilder$1
  extends MethodAdapter
{
  final TypeStructureBuilder this$0;
  private final ApiMethod val$method;
  
  TypeStructureBuilder$1(TypeStructureBuilder paramTypeStructureBuilder, MethodVisitor $anonymous0, ApiMethod paramApiMethod)
  {
    super($anonymous0);this$0 = paramTypeStructureBuilder;val$method = paramApiMethod;
  }
  
  public AnnotationVisitor visitAnnotation(String sig, boolean visible)
  {
    if ((visible) && ("Ljava/lang/invoke/MethodHandle$PolymorphicSignature;".equals(sig))) {
      val$method.isPolymorphic();
    }
    return super.visitAnnotation(sig, visible);
  }
  
  public AnnotationVisitor visitAnnotationDefault()
  {
    return new TypeStructureBuilder.2(this, val$method);
  }
}

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

import java.io.PrintWriter;
import java.io.StringWriter;
import org.objectweb.asm.util.TraceAnnotationVisitor;

class TypeStructureBuilder$2
  extends TraceAnnotationVisitor
{
  final TypeStructureBuilder.1 this$1;
  private final ApiMethod val$method;
  
  TypeStructureBuilder$2(TypeStructureBuilder.1 param1, ApiMethod paramApiMethod)
  {
    this$1 = param1;val$method = paramApiMethod;
  }
  
  public void visitEnd()
  {
    super.visitEnd();
    StringWriter stringWriter = new StringWriter();
    PrintWriter writer = new PrintWriter(stringWriter);
    print(writer);
    writer.flush();
    writer.close();
    String def = String.valueOf(stringWriter.getBuffer());
    val$method.setDefaultValue(def);
  }
}

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

import org.objectweb.asm.ClassAdapter;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.MethodVisitor;

class TypeStructureBuilder$EnclosingMethodSetter
  extends ClassAdapter
{
  String name;
  String signature;
  boolean found = false;
  String typeName;
  
  public TypeStructureBuilder$EnclosingMethodSetter(ClassVisitor cv, String typeName)
  {
    super(cv);
    this.typeName = typeName.replace('.', '/');
  }
  
  public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
  {
    if ("<clinit>".equals(name)) {
      return null;
    }
    if ((!found) && 
      ((access & 0x500) == 0))
    {
      this.name = name;
      this.signature = desc;
      if (signature != null) {
        this.signature = signature;
      }
      MethodVisitor mv;
      MethodVisitor mv;
      if ("<init>".equals(name)) {
        mv = new TypeStructureBuilder.TypeNameFinderInConstructor(cv.visitMethod(access, name, desc, signature, exceptions), this);
      } else {
        mv = new TypeStructureBuilder.TypeNameFinder(cv.visitMethod(access, name, desc, signature, exceptions), this);
      }
      return mv;
    }
    return null;
  }
}

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

import org.objectweb.asm.MethodAdapter;
import org.objectweb.asm.MethodVisitor;

class TypeStructureBuilder$TypeNameFinder
  extends MethodAdapter
{
  protected TypeStructureBuilder.EnclosingMethodSetter setter;
  
  public TypeStructureBuilder$TypeNameFinder(MethodVisitor mv, TypeStructureBuilder.EnclosingMethodSetter enclosingMethodSetter)
  {
    super(mv);
    setter = enclosingMethodSetter;
  }
  
  public void visitTypeInsn(int opcode, String type)
  {
    if (setter.typeName.equals(type)) {
      setter.found = true;
    }
  }
}

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

import org.objectweb.asm.Label;
import org.objectweb.asm.MethodVisitor;

class TypeStructureBuilder$TypeNameFinderInConstructor
  extends TypeStructureBuilder.TypeNameFinder
{
  int lineNumberStart;
  int matchingLineNumber;
  int currentLineNumber = -1;
  
  public TypeStructureBuilder$TypeNameFinderInConstructor(MethodVisitor mv, TypeStructureBuilder.EnclosingMethodSetter enclosingMethodSetter)
  {
    super(mv, enclosingMethodSetter);
  }
  
  public void visitFieldInsn(int opcode, String owner, String name, String desc)
  {
    super.visitFieldInsn(opcode, owner, name, desc);
  }
  
  public void visitTypeInsn(int opcode, String type)
  {
    if ((!setter.found) && (setter.typeName.equals(type)))
    {
      matchingLineNumber = currentLineNumber;
      setter.found = true;
    }
  }
  
  public void visitLineNumber(int line, Label start)
  {
    if (currentLineNumber == -1) {
      lineNumberStart = line;
    }
    currentLineNumber = line;
  }
  
  public void visitEnd()
  {
    if (setter.found) {
      if ((matchingLineNumber < lineNumberStart) || (matchingLineNumber > currentLineNumber)) {
        setter.found = false;
      }
    }
  }
}

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

import org.eclipse.core.runtime.CoreException;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiType;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiTypeRoot;
import org.objectweb.asm.AnnotationVisitor;
import org.objectweb.asm.ClassAdapter;
import org.objectweb.asm.ClassReader;
import org.objectweb.asm.ClassVisitor;
import org.objectweb.asm.FieldVisitor;
import org.objectweb.asm.Label;
import org.objectweb.asm.MethodAdapter;
import org.objectweb.asm.MethodVisitor;
import org.objectweb.asm.tree.ClassNode;

public class TypeStructureBuilder
  extends ClassAdapter
{
  ApiType fType;
  IApiComponent fComponent;
  IApiTypeRoot fFile;
  
  TypeStructureBuilder(ClassVisitor cv, IApiComponent component, IApiTypeRoot file)
  {
    super(cv);
    fComponent = component;
    fFile = file;
  }
  
  public void visit(int version, int access, String name, String signature, String superName, String[] interfaces)
  {
    StringBuffer simpleSig = new StringBuffer();
    simpleSig.append('L');
    simpleSig.append(name);
    simpleSig.append(';');
    String enclosingName = null;
    int index = name.lastIndexOf('$');
    if (index > -1) {
      enclosingName = name.substring(0, index).replace('/', '.');
    }
    int laccess = access;
    if ((laccess & 0x20000) != 0)
    {
      laccess &= 0xFFFDFFFF;
      laccess |= 0x100000;
    }
    fType = new ApiType(fComponent, name.replace('/', '.'), simpleSig.toString(), signature, laccess, enclosingName, fFile);
    if (superName != null) {
      fType.setSuperclassName(superName.replace('/', '.'));
    }
    if ((interfaces != null) && (interfaces.length > 0))
    {
      String[] names = new String[interfaces.length];
      for (int i = 0; i < names.length; i++) {
        names[i] = interfaces[i].replace('/', '.');
      }
      fType.setSuperInterfaceNames(names);
    }
    super.visit(version, laccess, name, signature, superName, interfaces);
  }
  
  public void visitInnerClass(String name, String outerName, String innerName, int access)
  {
    super.visitInnerClass(name, outerName, innerName, access);
    String currentName = name.replace('/', '.');
    if (currentName.equals(fType.getName())) {
      if (innerName == null)
      {
        fType.setAnonymous();
      }
      else if (outerName == null)
      {
        fType.setLocal();
        fType.setSimpleName(innerName);
      }
    }
    if ((outerName != null) && (innerName != null))
    {
      String currentOuterName = outerName.replace('/', '.');
      if (currentOuterName.equals(fType.getName()))
      {
        fType.addMemberType(currentName, access);
      }
      else if (currentName.equals(fType.getName()))
      {
        fType.setModifiers(access);
        fType.setSimpleName(innerName);
        fType.setMemberType();
      }
    }
  }
  
  public void visitOuterClass(String owner, String name, String desc)
  {
    fType.setEnclosingMethodInfo(name, desc);
  }
  
  public FieldVisitor visitField(int access, String name, String desc, String signature, Object value)
  {
    int laccess = access;
    if ((access & 0x20000) != 0)
    {
      laccess &= 0xFFFDFFFF;
      laccess |= 0x100000;
    }
    fType.addField(name, desc, signature, laccess, value);
    return null;
  }
  
  public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
  {
    String[] names = (String[])null;
    int laccess = access;
    if ((laccess & 0x20000) != 0)
    {
      laccess &= 0xFFFDFFFF;
      laccess |= 0x100000;
    }
    if ((exceptions != null) && (exceptions.length > 0))
    {
      names = new String[exceptions.length];
      for (int i = 0; i < names.length; i++) {
        names[i] = exceptions[i].replace('/', '.');
      }
    }
    ApiMethod method = fType.addMethod(name, desc, signature, laccess, names);
    new MethodAdapter(super.visitMethod(laccess, name, desc, signature, exceptions))
    {
      private final ApiMethod val$method;
      
      public AnnotationVisitor visitAnnotation(String sig, boolean visible)
      {
        if ((visible) && ("Ljava/lang/invoke/MethodHandle$PolymorphicSignature;".equals(sig))) {
          val$method.isPolymorphic();
        }
        return super.visitAnnotation(sig, visible);
      }
      
      public AnnotationVisitor visitAnnotationDefault()
      {
        return new TypeStructureBuilder.2(this, val$method);
      }
    };
  }
  
  public static IApiType buildTypeStructure(byte[] bytes, IApiComponent component, IApiTypeRoot file)
  {
    TypeStructureBuilder visitor = new TypeStructureBuilder(new ClassNode(), component, file);
    try
    {
      ClassReader classReader = new ClassReader(bytes);
      classReader.accept(visitor, 5);
    }
    catch (ArrayIndexOutOfBoundsException e)
    {
      ApiPlugin.log(e);
    }
    return fType;
  }
  
  public static void setEnclosingMethod(IApiType enclosingType, ApiType currentAnonymousLocalType)
  {
    IApiTypeRoot typeRoot = enclosingType.getTypeRoot();
    if ((typeRoot instanceof AbstractApiTypeRoot))
    {
      AbstractApiTypeRoot abstractApiTypeRoot = (AbstractApiTypeRoot)typeRoot;
      EnclosingMethodSetter visitor = new EnclosingMethodSetter(new ClassNode(), currentAnonymousLocalType.getName());
      try
      {
        ClassReader classReader = new ClassReader(abstractApiTypeRoot.getContents());
        classReader.accept(visitor, 4);
      }
      catch (ArrayIndexOutOfBoundsException e)
      {
        ApiPlugin.log(e);
      }
      catch (CoreException e)
      {
        ApiPlugin.log(e);
      }
      if (found) {
        currentAnonymousLocalType.setEnclosingMethodInfo(name, signature);
      }
    }
  }
  
  static class EnclosingMethodSetter
    extends ClassAdapter
  {
    String name;
    String signature;
    boolean found = false;
    String typeName;
    
    public EnclosingMethodSetter(ClassVisitor cv, String typeName)
    {
      super();
      this.typeName = typeName.replace('.', '/');
    }
    
    public MethodVisitor visitMethod(int access, String name, String desc, String signature, String[] exceptions)
    {
      if ("<clinit>".equals(name)) {
        return null;
      }
      if ((!found) && 
        ((access & 0x500) == 0))
      {
        this.name = name;
        this.signature = desc;
        if (signature != null) {
          this.signature = signature;
        }
        MethodVisitor mv;
        MethodVisitor mv;
        if ("<init>".equals(name)) {
          mv = new TypeStructureBuilder.TypeNameFinderInConstructor(cv.visitMethod(access, name, desc, signature, exceptions), this);
        } else {
          mv = new TypeStructureBuilder.TypeNameFinder(cv.visitMethod(access, name, desc, signature, exceptions), this);
        }
        return mv;
      }
      return null;
    }
  }
  
  static class TypeNameFinder
    extends MethodAdapter
  {
    protected TypeStructureBuilder.EnclosingMethodSetter setter;
    
    public TypeNameFinder(MethodVisitor mv, TypeStructureBuilder.EnclosingMethodSetter enclosingMethodSetter)
    {
      super();
      setter = enclosingMethodSetter;
    }
    
    public void visitTypeInsn(int opcode, String type)
    {
      if (setter.typeName.equals(type)) {
        setter.found = true;
      }
    }
  }
  
  static class TypeNameFinderInConstructor
    extends TypeStructureBuilder.TypeNameFinder
  {
    int lineNumberStart;
    int matchingLineNumber;
    int currentLineNumber = -1;
    
    public TypeNameFinderInConstructor(MethodVisitor mv, TypeStructureBuilder.EnclosingMethodSetter enclosingMethodSetter)
    {
      super(enclosingMethodSetter);
    }
    
    public void visitFieldInsn(int opcode, String owner, String name, String desc)
    {
      super.visitFieldInsn(opcode, owner, name, desc);
    }
    
    public void visitTypeInsn(int opcode, String type)
    {
      if ((!setter.found) && (setter.typeName.equals(type)))
      {
        matchingLineNumber = currentLineNumber;
        setter.found = true;
      }
    }
    
    public void visitLineNumber(int line, Label start)
    {
      if (currentLineNumber == -1) {
        lineNumberStart = line;
      }
      currentLineNumber = line;
    }
    
    public void visitEnd()
    {
      if (setter.found) {
        if ((matchingLineNumber < lineNumberStart) || (matchingLineNumber > currentLineNumber)) {
          setter.found = false;
        }
      }
    }
  }
  
  public String toString()
  {
    StringBuffer buffer = new StringBuffer();
    buffer.append("Type structure builder for: ").append(fType.getName());
    buffer.append("\nBacked by file: ").append(fFile.getName());
    return buffer.toString();
  }
  
  /* Error */
  public static IApiType buildStubTypeStructure(byte[] contents, IApiComponent apiComponent, StubArchiveApiTypeContainer.ArchiveApiTypeRoot archiveApiTypeRoot)
  {
    // Byte code:
    //   0: new 144	java/io/DataInputStream
    //   3: dup
    //   4: new 143	java/io/ByteArrayInputStream
    //   7: dup
    //   8: aload_0
    //   9: invokespecial 271	java/io/ByteArrayInputStream:<init>	([B)V
    //   12: invokespecial 276	java/io/DataInputStream:<init>	(Ljava/io/InputStream;)V
    //   15: astore_3
    //   16: aconst_null
    //   17: astore 4
    //   19: new 150	java/util/HashMap
    //   22: dup
    //   23: invokespecial 287	java/util/HashMap:<init>	()V
    //   26: astore 5
    //   28: aload_3
    //   29: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   32: istore 6
    //   34: aload_3
    //   35: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   38: istore 7
    //   40: iconst_0
    //   41: istore 8
    //   43: goto +37 -> 80
    //   46: aload_3
    //   47: invokevirtual 277	java/io/DataInputStream:readUTF	()Ljava/lang/String;
    //   50: astore 9
    //   52: aload_3
    //   53: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   56: istore 10
    //   58: aload 5
    //   60: new 147	java/lang/Integer
    //   63: dup
    //   64: iload 10
    //   66: invokespecial 278	java/lang/Integer:<init>	(I)V
    //   69: aload 9
    //   71: invokeinterface 314 3 0
    //   76: pop
    //   77: iinc 8 1
    //   80: iload 8
    //   82: iload 7
    //   84: if_icmplt -38 -> 46
    //   87: iconst_0
    //   88: istore 8
    //   90: iload 6
    //   92: iconst_2
    //   93: if_icmplt +9 -> 102
    //   96: aload_3
    //   97: invokevirtual 273	java/io/DataInputStream:readChar	()C
    //   100: istore 8
    //   102: aload_3
    //   103: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   106: istore 9
    //   108: aload 5
    //   110: new 147	java/lang/Integer
    //   113: dup
    //   114: iload 9
    //   116: invokespecial 278	java/lang/Integer:<init>	(I)V
    //   119: invokeinterface 313 2 0
    //   124: checkcast 148	java/lang/String
    //   127: astore 10
    //   129: new 149	java/lang/StringBuffer
    //   132: dup
    //   133: invokespecial 283	java/lang/StringBuffer:<init>	()V
    //   136: astore 11
    //   138: aload 11
    //   140: bipush 76
    //   142: invokevirtual 285	java/lang/StringBuffer:append	(C)Ljava/lang/StringBuffer;
    //   145: pop
    //   146: aload 11
    //   148: aload 10
    //   150: invokevirtual 286	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   153: pop
    //   154: aload 11
    //   156: bipush 59
    //   158: invokevirtual 285	java/lang/StringBuffer:append	(C)Ljava/lang/StringBuffer;
    //   161: pop
    //   162: new 154	org/eclipse/pde/api/tools/internal/model/ApiType
    //   165: dup
    //   166: aload_1
    //   167: aload 10
    //   169: bipush 47
    //   171: bipush 46
    //   173: invokevirtual 281	java/lang/String:replace	(CC)Ljava/lang/String;
    //   176: aload 11
    //   178: invokevirtual 284	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   181: aconst_null
    //   182: iload 8
    //   184: aconst_null
    //   185: aload_2
    //   186: invokespecial 301	org/eclipse/pde/api/tools/internal/model/ApiType:<init>	(Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiElement;Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/String;Lorg/eclipse/pde/api/tools/internal/provisional/model/IApiTypeRoot;)V
    //   189: astore 4
    //   191: aload_3
    //   192: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   195: istore 12
    //   197: iload 12
    //   199: iconst_m1
    //   200: if_icmpeq +38 -> 238
    //   203: aload 5
    //   205: new 147	java/lang/Integer
    //   208: dup
    //   209: iload 12
    //   211: invokespecial 278	java/lang/Integer:<init>	(I)V
    //   214: invokeinterface 313 2 0
    //   219: checkcast 148	java/lang/String
    //   222: astore 13
    //   224: aload 4
    //   226: aload 13
    //   228: bipush 47
    //   230: bipush 46
    //   232: invokevirtual 281	java/lang/String:replace	(CC)Ljava/lang/String;
    //   235: invokevirtual 295	org/eclipse/pde/api/tools/internal/model/ApiType:setSuperclassName	(Ljava/lang/String;)V
    //   238: aload_3
    //   239: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   242: istore 13
    //   244: iload 13
    //   246: ifeq +71 -> 317
    //   249: iload 13
    //   251: anewarray 148	java/lang/String
    //   254: astore 14
    //   256: iconst_0
    //   257: istore 15
    //   259: goto +43 -> 302
    //   262: aload 5
    //   264: new 147	java/lang/Integer
    //   267: dup
    //   268: aload_3
    //   269: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   272: invokespecial 278	java/lang/Integer:<init>	(I)V
    //   275: invokeinterface 313 2 0
    //   280: checkcast 148	java/lang/String
    //   283: astore 16
    //   285: aload 14
    //   287: iload 15
    //   289: aload 16
    //   291: bipush 47
    //   293: bipush 46
    //   295: invokevirtual 281	java/lang/String:replace	(CC)Ljava/lang/String;
    //   298: aastore
    //   299: iinc 15 1
    //   302: iload 15
    //   304: aload 14
    //   306: arraylength
    //   307: if_icmplt -45 -> 262
    //   310: aload 4
    //   312: aload 14
    //   314: invokevirtual 297	org/eclipse/pde/api/tools/internal/model/ApiType:setSuperInterfaceNames	([Ljava/lang/String;)V
    //   317: aload_3
    //   318: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   321: istore 14
    //   323: iconst_0
    //   324: istore 15
    //   326: goto +41 -> 367
    //   329: aload 5
    //   331: new 147	java/lang/Integer
    //   334: dup
    //   335: aload_3
    //   336: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   339: invokespecial 278	java/lang/Integer:<init>	(I)V
    //   342: invokeinterface 313 2 0
    //   347: checkcast 148	java/lang/String
    //   350: astore 16
    //   352: aload 4
    //   354: aload 16
    //   356: aconst_null
    //   357: aconst_null
    //   358: iconst_0
    //   359: aconst_null
    //   360: invokevirtual 299	org/eclipse/pde/api/tools/internal/model/ApiType:addField	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;ILjava/lang/Object;)Lorg/eclipse/pde/api/tools/internal/model/ApiField;
    //   363: pop
    //   364: iinc 15 1
    //   367: iload 15
    //   369: iload 14
    //   371: if_icmplt -42 -> 329
    //   374: aload_3
    //   375: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   378: istore 15
    //   380: iconst_0
    //   381: istore 16
    //   383: goto +92 -> 475
    //   386: iconst_0
    //   387: istore 17
    //   389: aload 5
    //   391: new 147	java/lang/Integer
    //   394: dup
    //   395: aload_3
    //   396: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   399: invokespecial 278	java/lang/Integer:<init>	(I)V
    //   402: invokeinterface 313 2 0
    //   407: checkcast 148	java/lang/String
    //   410: astore 18
    //   412: aload 5
    //   414: new 147	java/lang/Integer
    //   417: dup
    //   418: aload_3
    //   419: invokevirtual 274	java/io/DataInputStream:readShort	()S
    //   422: invokespecial 278	java/lang/Integer:<init>	(I)V
    //   425: invokeinterface 313 2 0
    //   430: checkcast 148	java/lang/String
    //   433: astore 19
    //   435: iload 6
    //   437: iconst_3
    //   438: if_icmpne +9 -> 447
    //   441: aload_3
    //   442: invokevirtual 272	java/io/DataInputStream:readByte	()B
    //   445: istore 17
    //   447: aload 4
    //   449: aload 18
    //   451: aload 19
    //   453: aconst_null
    //   454: iload 17
    //   456: iconst_1
    //   457: if_icmpne +9 -> 466
    //   460: ldc_w 141
    //   463: goto +4 -> 467
    //   466: iconst_0
    //   467: aconst_null
    //   468: invokevirtual 300	org/eclipse/pde/api/tools/internal/model/ApiType:addMethod	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;I[Ljava/lang/String;)Lorg/eclipse/pde/api/tools/internal/model/ApiMethod;
    //   471: pop
    //   472: iinc 16 1
    //   475: iload 16
    //   477: iload 15
    //   479: if_icmplt -93 -> 386
    //   482: goto +34 -> 516
    //   485: astore 5
    //   487: aload 5
    //   489: invokestatic 305	org/eclipse/pde/api/tools/internal/provisional/ApiPlugin:log	(Ljava/lang/Throwable;)V
    //   492: aload_3
    //   493: invokevirtual 275	java/io/DataInputStream:close	()V
    //   496: goto +28 -> 524
    //   499: pop
    //   500: goto +24 -> 524
    //   503: astore 20
    //   505: aload_3
    //   506: invokevirtual 275	java/io/DataInputStream:close	()V
    //   509: goto +4 -> 513
    //   512: pop
    //   513: aload 20
    //   515: athrow
    //   516: aload_3
    //   517: invokevirtual 275	java/io/DataInputStream:close	()V
    //   520: goto +4 -> 524
    //   523: pop
    //   524: aload 4
    //   526: areturn
    // Line number table:
    //   Java source line #329	-> byte code offset #0
    //   Java source line #330	-> byte code offset #16
    //   Java source line #332	-> byte code offset #19
    //   Java source line #333	-> byte code offset #28
    //   Java source line #334	-> byte code offset #34
    //   Java source line #335	-> byte code offset #40
    //   Java source line #336	-> byte code offset #46
    //   Java source line #337	-> byte code offset #52
    //   Java source line #338	-> byte code offset #58
    //   Java source line #335	-> byte code offset #77
    //   Java source line #340	-> byte code offset #87
    //   Java source line #342	-> byte code offset #90
    //   Java source line #343	-> byte code offset #96
    //   Java source line #345	-> byte code offset #102
    //   Java source line #346	-> byte code offset #108
    //   Java source line #347	-> byte code offset #129
    //   Java source line #348	-> byte code offset #138
    //   Java source line #349	-> byte code offset #146
    //   Java source line #350	-> byte code offset #154
    //   Java source line #351	-> byte code offset #162
    //   Java source line #352	-> byte code offset #191
    //   Java source line #353	-> byte code offset #197
    //   Java source line #354	-> byte code offset #203
    //   Java source line #355	-> byte code offset #224
    //   Java source line #357	-> byte code offset #238
    //   Java source line #358	-> byte code offset #244
    //   Java source line #359	-> byte code offset #249
    //   Java source line #360	-> byte code offset #256
    //   Java source line #361	-> byte code offset #262
    //   Java source line #362	-> byte code offset #285
    //   Java source line #360	-> byte code offset #299
    //   Java source line #364	-> byte code offset #310
    //   Java source line #366	-> byte code offset #317
    //   Java source line #367	-> byte code offset #323
    //   Java source line #368	-> byte code offset #329
    //   Java source line #369	-> byte code offset #352
    //   Java source line #367	-> byte code offset #364
    //   Java source line #371	-> byte code offset #374
    //   Java source line #372	-> byte code offset #380
    //   Java source line #373	-> byte code offset #386
    //   Java source line #374	-> byte code offset #389
    //   Java source line #375	-> byte code offset #412
    //   Java source line #376	-> byte code offset #435
    //   Java source line #377	-> byte code offset #441
    //   Java source line #379	-> byte code offset #447
    //   Java source line #372	-> byte code offset #472
    //   Java source line #381	-> byte code offset #485
    //   Java source line #382	-> byte code offset #487
    //   Java source line #385	-> byte code offset #492
    //   Java source line #386	-> byte code offset #499
    //   Java source line #383	-> byte code offset #503
    //   Java source line #385	-> byte code offset #505
    //   Java source line #386	-> byte code offset #512
    //   Java source line #389	-> byte code offset #513
    //   Java source line #385	-> byte code offset #516
    //   Java source line #386	-> byte code offset #523
    //   Java source line #390	-> byte code offset #524
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	527	0	contents	byte[]
    //   0	527	1	apiComponent	IApiComponent
    //   0	527	2	archiveApiTypeRoot	StubArchiveApiTypeContainer.ArchiveApiTypeRoot
    //   15	502	3	inputStream	java.io.DataInputStream
    //   17	508	4	type	ApiType
    //   26	387	5	pool	java.util.Map
    //   485	3	5	e	java.io.IOException
    //   32	404	6	currentVersion	short
    //   38	45	7	poolSize	short
    //   41	40	8	i	int
    //   88	95	8	access	int
    //   50	20	9	readUtf	String
    //   106	9	9	classIndex	int
    //   56	9	10	index	int
    //   127	41	10	name	String
    //   136	41	11	simpleSig	StringBuffer
    //   195	15	12	superclassNameIndex	int
    //   222	5	13	superclassName	String
    //   242	8	13	interfacesLength	int
    //   254	59	14	names	String[]
    //   321	49	14	fieldsLength	int
    //   257	46	15	i	int
    //   324	44	15	i	int
    //   378	100	15	methodsLength	int
    //   283	7	16	interfaceName	String
    //   350	5	16	fieldName	String
    //   381	95	16	i	int
    //   387	68	17	isPolymorphic	int
    //   410	40	18	methodSelector	String
    //   433	19	19	methodSignature	String
    //   503	11	20	localObject	Object
    //   499	1	31	localIOException1	java.io.IOException
    //   512	1	32	localIOException2	java.io.IOException
    //   523	1	33	localIOException3	java.io.IOException
    // Exception table:
    //   from	to	target	type
    //   19	482	485	java/io/IOException
    //   492	496	499	java/io/IOException
    //   19	492	503	finally
    //   505	509	512	java/io/IOException
    //   516	520	523	java/io/IOException
  }
}

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

import java.util.Arrays;
import java.util.HashSet;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.osgi.service.resolver.State;
import org.eclipse.pde.api.tools.internal.provisional.model.IApiComponent;
import org.eclipse.pde.internal.core.PDECore;
import org.eclipse.pde.internal.core.PDEState;
import org.eclipse.pde.internal.core.PluginModelManager;

public class WorkspaceBaseline
  extends ApiBaseline
{
  public WorkspaceBaseline()
  {
    super("workspace");
  }
  
  public void dispose()
  {
    doDispose();
  }
  
  public State getState()
  {
    return PDECore.getDefault().getModelManager().getState().getState();
  }
  
  public void addApiComponents(IApiComponent[] components)
    throws CoreException
  {
    HashSet ees = new HashSet();
    for (int i = 0; i < components.length; i++)
    {
      BundleComponent component = (BundleComponent)components[i];
      if (!component.isSourceComponent())
      {
        addComponent(component);
        ees.addAll(Arrays.asList(component.getExecutionEnvironments()));
      }
    }
    resolveSystemLibrary(ees);
  }
}

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

import org.eclipse.core.resources.ICommand;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.resources.IProjectNature;
import org.eclipse.core.runtime.CoreException;

public class ApiToolProjectNature
  implements IProjectNature
{
  IProject project;
  
  public void configure()
    throws CoreException
  {
    addToBuildSpec("org.eclipse.pde.api.tools.apiAnalysisBuilder");
  }
  
  public void deconfigure()
    throws CoreException
  {
    removeFromBuildSpec("org.eclipse.pde.api.tools.apiAnalysisBuilder");
  }
  
  public IProject getProject()
  {
    return project;
  }
  
  public void setProject(IProject project)
  {
    this.project = project;
  }
  
  protected void addToBuildSpec(String builderID)
    throws CoreException
  {
    IProjectDescription description = project.getDescription();
    ICommand[] oldBuildSpec = description.getBuildSpec();
    int oldApiCommandIndex = -1;
    int length = oldBuildSpec.length;
    for (int i = 0; i < length; i++) {
      if (oldBuildSpec[i].getBuilderName().equals(builderID))
      {
        oldApiCommandIndex = i;
        break;
      }
    }
    ICommand newCommand = description.newCommand();
    newCommand.setBuilderName(builderID);
    ICommand[] newCommands;
    if (oldApiCommandIndex == -1)
    {
      ICommand[] newCommands = new ICommand[length + 1];
      System.arraycopy(oldBuildSpec, 0, newCommands, 0, length);
      newCommands[length] = newCommand;
    }
    else
    {
      oldBuildSpec[oldApiCommandIndex] = newCommand;
      newCommands = oldBuildSpec;
    }
    description.setBuildSpec(newCommands);
    project.setDescription(description, null);
  }
  
  protected void removeFromBuildSpec(String builderID)
    throws CoreException
  {
    IProjectDescription description = project.getDescription();
    ICommand[] commands = description.getBuildSpec();
    for (int i = 0; i < commands.length; i++) {
      if (commands[i].getBuilderName().equals(builderID))
      {
        ICommand[] newCommands = new ICommand[commands.length - 1];
        System.arraycopy(commands, 0, newCommands, 0, i);
        System.arraycopy(commands, i + 1, newCommands, i, commands.length - i - 1);
        description.setBuildSpec(newCommands);
        project.setDescription(description, null);
        return;
      }
    }
  }
}

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

import org.eclipse.core.runtime.Path;
import org.eclipse.pde.api.tools.internal.provisional.ApiPlugin;
import org.eclipse.pde.api.tools.internal.provisional.problems.IApiProblem;
import org.eclipse.pde.api.tools.internal.util.Util;

public class ApiProblem
  implements IApiProblem
{
  private String fMessage = null;
  private String fResourcePath = null;
  private String fTypeName = null;
  private int fId = 0;
  private String[] fExtraArgumentIds = null;
  private Object[] fExtraArguments = null;
  private String[] fMessageArguments = null;
  private int fLineNumber = -1;
  private int fCharStart = -1;
  private int fCharEnd = -1;
  public static final int CATEGORY_MASK = -268435456;
  public static final int ELEMENT_KIND_MASK = 251658240;
  public static final int KIND_MASK = 15728640;
  public static final int FLAGS_MASK = 1044480;
  public static final int MESSAGE_MASK = 4095;
  public static final String COMPATIBILITY_STATUS = "compatibilityStatus";
  
  public ApiProblem(String path, String typeName, String[] messageargs, String[] argumentids, Object[] arguments, int linenumber, int charstart, int charend, int id)
  {
    fResourcePath = path;
    fTypeName = typeName;
    fId = id;
    fExtraArgumentIds = argumentids;
    fExtraArguments = arguments;
    fLineNumber = linenumber;
    fCharStart = charstart;
    fCharEnd = charend;
    fMessageArguments = messageargs;
  }
  
  public int getId()
  {
    return fId;
  }
  
  public int getCategory()
  {
    return fId & 0xF0000000;
  }
  
  public int getMessageid()
  {
    return (fId & 0xFFF) >> 0;
  }
  
  public int getFlags()
  {
    return (fId & 0xFF000) >> 12;
  }
  
  public int getKind()
  {
    return (fId & 0xF00000) >> 20;
  }
  
  public String getMessage()
  {
    if (fMessage == null) {
      fMessage = ApiProblemFactory.getLocalizedMessage(this);
    }
    return fMessage;
  }
  
  public String getResourcePath()
  {
    return fResourcePath;
  }
  
  public int getSeverity()
  {
    if (ApiPlugin.isRunningInFramework()) {
      return ApiPlugin.getDefault().getSeverityLevel(ApiProblemFactory.getProblemSeverityId(this), null);
    }
    return 1;
  }
  
  public int getElementKind()
  {
    return (fId & 0xF000000) >> 24;
  }
  
  public int getLineNumber()
  {
    return fLineNumber;
  }
  
  public int getCharStart()
  {
    return fCharStart;
  }
  
  public int getCharEnd()
  {
    return fCharEnd;
  }
  
  public String[] getExtraMarkerAttributeIds()
  {
    if ((fExtraArguments == null) || (fExtraArgumentIds == null)) {
      return new String[0];
    }
    if (fExtraArgumentIds.length != fExtraArguments.length) {
      return new String[0];
    }
    return fExtraArgumentIds;
  }
  
  public Object[] getExtraMarkerAttributeValues()
  {
    if ((fExtraArguments == null) || (fExtraArgumentIds == null)) {
      return new String[0];
    }
    if (fExtraArgumentIds.length != fExtraArguments.length) {
      return new String[0];
    }
    return fExtraArguments;
  }
  
  public String[] getMessageArguments()
  {
    if (fMessageArguments == null) {
      return new String[0];
    }
    return fMessageArguments;
  }
  
  public boolean equals(Object obj)
  {
    if ((obj instanceof IApiProblem))
    {
      IApiProblem problem = (IApiProblem)obj;
      if ((problem.getId() == fId) && (argumentsEqual(problem.getMessageArguments())))
      {
        String resourcePath = problem.getResourcePath();
        if (resourcePath == null)
        {
          if (fResourcePath != null) {
            return false;
          }
        }
        else
        {
          if (fResourcePath == null) {
            return false;
          }
          if (!new Path(resourcePath).equals(new Path(fResourcePath))) {
            return false;
          }
        }
        String typeName = problem.getTypeName();
        if (typeName == null)
        {
          if (fTypeName != null) {
            return false;
          }
          return true;
        }
        if (fTypeName == null) {
          return false;
        }
        return typeName.equals(fTypeName);
      }
      return false;
    }
    return super.equals(obj);
  }
  
  private boolean argumentsEqual(String[] arguments)
  {
    String[] currentArguments = getMessageArguments();
    if (((currentArguments == null) && (arguments != null)) || (
      (currentArguments != null) && (arguments == null))) {
      return false;
    }
    boolean equal = true;
    if (currentArguments.length != arguments.length) {
      return false;
    }
    for (int i = 0; i < currentArguments.length; i++) {
      equal &= currentAr
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