org.eclipse.osgi_3.7.2.v20120110-1415

xception(NLS.bind(Msg.BUNDLE_CNFE_NOT_RESOLVED, name, getBundleData().getLocation()));
    }
    try
    {
      return loader.loadClass(name);
    }
    catch (ClassNotFoundException e)
    {
      if ((!(e instanceof StatusException)) && ((bundledata.getStatus() & 0x2) != 0) && (!testStateChanging(Thread.currentThread()))) {
        try
        {
          loader.setLazyTrigger();
        }
        catch (BundleException be)
        {
          framework.adaptor.getFrameworkLog().log(new FrameworkLogEntry("org.eclipse.osgi", 2, 0, be.getMessage(), 0, be, null));
        }
      }
      throw e;
    }
  }
  
  public URL getResource(String name)
  {
    BundleLoader loader = null;
    try
    {
      framework.checkAdminPermission(this, "resource");
    }
    catch (SecurityException localSecurityException)
    {
      return null;
    }
    loader = checkLoader();
    if (loader == null)
    {
      Enumeration<URL> result = bundledata.findLocalResources(name);
      if ((result != null) && (result.hasMoreElements())) {
        return (URL)result.nextElement();
      }
      return null;
    }
    return loader.findResource(name);
  }
  
  public Enumeration<URL> getResources(String name)
    throws IOException
  {
    BundleLoader loader = null;
    try
    {
      framework.checkAdminPermission(this, "resource");
    }
    catch (SecurityException localSecurityException)
    {
      return null;
    }
    loader = checkLoader();
    Enumeration<URL> result;
    Enumeration<URL> result;
    if (loader == null) {
      result = bundledata.findLocalResources(name);
    } else {
      result = loader.getResources(name);
    }
    if ((result != null) && (result.hasMoreElements())) {
      return result;
    }
    return null;
  }
  
  /* Error */
  protected void startWorker(int options)
    throws BundleException
  {
    // Byte code:
    //   0: iload_1
    //   1: iconst_1
    //   2: iand
    //   3: ifne +61 -> 64
    //   6: aload_0
    //   7: iconst_1
    //   8: iconst_1
    //   9: invokevirtual 509	org/eclipse/osgi/framework/internal/core/BundleHost:setStatus	(IZ)V
    //   12: aload_0
    //   13: iconst_4
    //   14: iload_1
    //   15: iconst_2
    //   16: iand
    //   17: ifeq +7 -> 24
    //   20: iconst_1
    //   21: goto +4 -> 25
    //   24: iconst_0
    //   25: invokevirtual 509	org/eclipse/osgi/framework/internal/core/BundleHost:setStatus	(IZ)V
    //   28: getstatic 451	org/eclipse/osgi/framework/debug/Debug:MONITOR_ACTIVATION	Z
    //   31: ifeq +33 -> 64
    //   34: new 219	java/lang/Exception
    //   37: dup
    //   38: new 224	java/lang/StringBuffer
    //   41: dup
    //   42: ldc_w 207
    //   45: invokespecial 480	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   48: aload_0
    //   49: invokevirtual 512	org/eclipse/osgi/framework/internal/core/BundleHost:getBundleData	()Lorg/eclipse/osgi/framework/adaptor/BundleData;
    //   52: invokevirtual 483	java/lang/StringBuffer:append	(Ljava/lang/Object;)Ljava/lang/StringBuffer;
    //   55: invokevirtual 479	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   58: invokespecial 476	java/lang/Exception:<init>	(Ljava/lang/String;)V
    //   61: invokevirtual 475	java/lang/Exception:printStackTrace	()V
    //   64: aload_0
    //   65: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   68: getfield 462	org/eclipse/osgi/framework/internal/core/Framework:active	Z
    //   71: ifeq +13 -> 84
    //   74: aload_0
    //   75: getfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   78: bipush 32
    //   80: iand
    //   81: ifeq +4 -> 85
    //   84: return
    //   85: aload_0
    //   86: invokevirtual 500	org/eclipse/osgi/framework/internal/core/BundleHost:getInternalStartLevel	()I
    //   89: aload_0
    //   90: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   93: getfield 466	org/eclipse/osgi/framework/internal/core/Framework:startLevelManager	Lorg/eclipse/osgi/framework/internal/core/StartLevelManager;
    //   96: invokevirtual 527	org/eclipse/osgi/framework/internal/core/StartLevelManager:getStartLevel	()I
    //   99: if_icmple +46 -> 145
    //   102: iload_1
    //   103: ldc 1
    //   105: iand
    //   106: ifne +38 -> 144
    //   109: iload_1
    //   110: iconst_1
    //   111: iand
    //   112: ifeq +32 -> 144
    //   115: getstatic 470	org/eclipse/osgi/framework/internal/core/Msg:BUNDLE_TRANSIENT_START_ERROR	Ljava/lang/String;
    //   118: aload_0
    //   119: invokestatic 545	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
    //   122: astore_2
    //   123: new 254	org/osgi/framework/BundleException
    //   126: dup
    //   127: aload_2
    //   128: iconst_2
    //   129: new 235	org/eclipse/osgi/framework/internal/core/AbstractBundle$BundleStatusException
    //   132: dup
    //   133: aload_0
    //   134: aload_2
    //   135: iconst_4
    //   136: aload_0
    //   137: invokespecial 492	org/eclipse/osgi/framework/internal/core/AbstractBundle$BundleStatusException:<init>	(Lorg/eclipse/osgi/framework/internal/core/AbstractBundle;Ljava/lang/String;ILjava/lang/Object;)V
    //   140: invokespecial 549	org/osgi/framework/BundleException:<init>	(Ljava/lang/String;ILjava/lang/Throwable;)V
    //   143: athrow
    //   144: return
    //   145: aload_0
    //   146: getfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   149: iconst_2
    //   150: if_icmpne +62 -> 212
    //   153: aload_0
    //   154: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   157: getfield 465	org/eclipse/osgi/framework/internal/core/Framework:packageAdmin	Lorg/eclipse/osgi/framework/internal/core/PackageAdminImpl;
    //   160: iconst_1
    //   161: anewarray 253	org/osgi/framework/Bundle
    //   164: dup
    //   165: iconst_0
    //   166: aload_0
    //   167: aastore
    //   168: iconst_1
    //   169: invokevirtual 526	org/eclipse/osgi/framework/internal/core/PackageAdminImpl:resolveBundles	([Lorg/osgi/framework/Bundle;Z)Z
    //   172: ifne +40 -> 212
    //   175: aload_0
    //   176: invokevirtual 519	org/eclipse/osgi/framework/internal/core/BundleHost:getResolutionFailureException	()Lorg/osgi/framework/BundleException;
    //   179: athrow
    //   180: astore_2
    //   181: new 254	org/osgi/framework/BundleException
    //   184: dup
    //   185: ldc_w 211
    //   188: iconst_4
    //   189: aload_2
    //   190: invokespecial 549	org/osgi/framework/BundleException:<init>	(Ljava/lang/String;ILjava/lang/Throwable;)V
    //   193: athrow
    //   194: astore_2
    //   195: new 254	org/osgi/framework/BundleException
    //   198: dup
    //   199: ldc_w 211
    //   202: bipush 12
    //   204: aload_2
    //   205: invokevirtual 544	org/eclipse/osgi/service/resolver/ResolverHookException:getCause	()Ljava/lang/Throwable;
    //   208: invokespecial 549	org/osgi/framework/BundleException:<init>	(Ljava/lang/String;ILjava/lang/Throwable;)V
    //   211: athrow
    //   212: iload_1
    //   213: iconst_2
    //   214: iand
    //   215: ifeq +48 -> 263
    //   218: aload_0
    //   219: getfield 455	org/eclipse/osgi/framework/internal/core/BundleHost:bundledata	Lorg/eclipse/osgi/framework/adaptor/BundleData;
    //   222: invokeinterface 552 1 0
    //   227: iconst_2
    //   228: iand
    //   229: ifeq +34 -> 263
    //   232: aload_0
    //   233: getfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   236: iconst_4
    //   237: iand
    //   238: ifeq +24 -> 262
    //   241: aload_0
    //   242: bipush 8
    //   244: putfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   247: aload_0
    //   248: invokevirtual 504	org/eclipse/osgi/framework/internal/core/BundleHost:completeStateChange	()V
    //   251: aload_0
    //   252: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   255: sipush 512
    //   258: aload_0
    //   259: invokevirtual 523	org/eclipse/osgi/framework/internal/core/Framework:publishBundleEvent	(ILorg/osgi/framework/Bundle;)V
    //   262: return
    //   263: getstatic 450	org/eclipse/osgi/framework/debug/Debug:DEBUG_GENERAL	Z
    //   266: ifeq +58 -> 324
    //   269: new 224	java/lang/StringBuffer
    //   272: dup
    //   273: ldc_w 208
    //   276: invokespecial 480	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   279: aload_0
    //   280: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   283: getfield 466	org/eclipse/osgi/framework/internal/core/Framework:startLevelManager	Lorg/eclipse/osgi/framework/internal/core/StartLevelManager;
    //   286: invokevirtual 527	org/eclipse/osgi/framework/internal/core/StartLevelManager:getStartLevel	()I
    //   289: invokevirtual 481	java/lang/StringBuffer:append	(I)Ljava/lang/StringBuffer;
    //   292: ldc_w 206
    //   295: invokevirtual 484	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   298: aload_0
    //   299: invokevirtual 501	org/eclipse/osgi/framework/internal/core/BundleHost:getBundleId	()J
    //   302: invokevirtual 482	java/lang/StringBuffer:append	(J)Ljava/lang/StringBuffer;
    //   305: ldc_w 203
    //   308: invokevirtual 484	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   311: aload_0
    //   312: invokevirtual 500	org/eclipse/osgi/framework/internal/core/BundleHost:getInternalStartLevel	()I
    //   315: invokevirtual 481	java/lang/StringBuffer:append	(I)Ljava/lang/StringBuffer;
    //   318: invokevirtual 479	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   321: invokestatic 489	org/eclipse/osgi/framework/debug/Debug:println	(Ljava/lang/String;)V
    //   324: iload_1
    //   325: ldc 1
    //   327: iand
    //   328: ifeq +47 -> 375
    //   331: aload_0
    //   332: getfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   335: iconst_4
    //   336: iand
    //   337: ifeq +38 -> 375
    //   340: aload_0
    //   341: bipush 8
    //   343: putfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   346: aload_0
    //   347: invokevirtual 504	org/eclipse/osgi/framework/internal/core/BundleHost:completeStateChange	()V
    //   350: aload_0
    //   351: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   354: sipush 512
    //   357: aload_0
    //   358: invokevirtual 523	org/eclipse/osgi/framework/internal/core/Framework:publishBundleEvent	(ILorg/osgi/framework/Bundle;)V
    //   361: aload_0
    //   362: invokevirtual 502	org/eclipse/osgi/framework/internal/core/BundleHost:beginStateChange	()V
    //   365: aload_0
    //   366: getfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   369: bipush 8
    //   371: if_icmpeq +4 -> 375
    //   374: return
    //   375: aload_0
    //   376: bipush 8
    //   378: putfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   381: aload_0
    //   382: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   385: sipush 128
    //   388: aload_0
    //   389: invokevirtual 523	org/eclipse/osgi/framework/internal/core/Framework:publishBundleEvent	(ILorg/osgi/framework/Bundle;)V
    //   392: aload_0
    //   393: aload_0
    //   394: invokevirtual 514	org/eclipse/osgi/framework/internal/core/BundleHost:getContext	()Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   397: putfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   400: lconst_0
    //   401: lstore_2
    //   402: aload_0
    //   403: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   406: getfield 463	org/eclipse/osgi/framework/internal/core/Framework:adaptor	Lorg/eclipse/osgi/framework/adaptor/FrameworkAdaptor;
    //   409: invokeinterface 558 1 0
    //   414: astore 4
    //   416: aload 4
    //   418: ifnull +12 -> 430
    //   421: aload 4
    //   423: aload_0
    //   424: iconst_4
    //   425: invokeinterface 557 3 0
    //   430: getstatic 449	org/eclipse/osgi/framework/debug/Debug:DEBUG_BUNDLE_TIME	Z
    //   433: ifeq +33 -> 466
    //   436: invokestatic 485	java/lang/System:currentTimeMillis	()J
    //   439: lstore_2
    //   440: getstatic 448	java/lang/System:out	Ljava/io/PrintStream;
    //   443: new 224	java/lang/StringBuffer
    //   446: dup
    //   447: ldc_w 210
    //   450: invokespecial 480	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   453: aload_0
    //   454: invokevirtual 511	org/eclipse/osgi/framework/internal/core/BundleHost:getSymbolicName	()Ljava/lang/String;
    //   457: invokevirtual 484	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   460: invokevirtual 479	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   463: invokevirtual 472	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   466: aload_0
    //   467: getfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   470: invokevirtual 494	org/eclipse/osgi/framework/internal/core/BundleContextImpl:start	()V
    //   473: aload_0
    //   474: invokevirtual 505	org/eclipse/osgi/framework/internal/core/BundleHost:startHook	()V
    //   477: aload_0
    //   478: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   481: getfield 462	org/eclipse/osgi/framework/internal/core/Framework:active	Z
    //   484: ifeq +169 -> 653
    //   487: aload_0
    //   488: bipush 32
    //   490: putfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   493: getstatic 450	org/eclipse/osgi/framework/debug/Debug:DEBUG_GENERAL	Z
    //   496: ifeq +23 -> 519
    //   499: new 224	java/lang/StringBuffer
    //   502: dup
    //   503: ldc_w 204
    //   506: invokespecial 480	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   509: aload_0
    //   510: invokevirtual 483	java/lang/StringBuffer:append	(Ljava/lang/Object;)Ljava/lang/StringBuffer;
    //   513: invokevirtual 479	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   516: invokestatic 489	org/eclipse/osgi/framework/debug/Debug:println	(Ljava/lang/String;)V
    //   519: aload_0
    //   520: invokevirtual 504	org/eclipse/osgi/framework/internal/core/BundleHost:completeStateChange	()V
    //   523: aload_0
    //   524: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   527: iconst_2
    //   528: aload_0
    //   529: invokevirtual 523	org/eclipse/osgi/framework/internal/core/Framework:publishBundleEvent	(ILorg/osgi/framework/Bundle;)V
    //   532: goto +121 -> 653
    //   535: astore 5
    //   537: aload_0
    //   538: bipush 16
    //   540: putfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   543: aload_0
    //   544: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   547: sipush 256
    //   550: aload_0
    //   551: invokevirtual 523	org/eclipse/osgi/framework/internal/core/Framework:publishBundleEvent	(ILorg/osgi/framework/Bundle;)V
    //   554: aload_0
    //   555: invokevirtual 506	org/eclipse/osgi/framework/internal/core/BundleHost:stopHook	()V
    //   558: aload_0
    //   559: getfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   562: invokevirtual 493	org/eclipse/osgi/framework/internal/core/BundleContextImpl:close	()V
    //   565: aload_0
    //   566: aconst_null
    //   567: putfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   570: aload_0
    //   571: iconst_4
    //   572: putfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   575: aload_0
    //   576: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   579: iconst_4
    //   580: aload_0
    //   581: invokevirtual 523	org/eclipse/osgi/framework/internal/core/Framework:publishBundleEvent	(ILorg/osgi/framework/Bundle;)V
    //   584: aload 5
    //   586: athrow
    //   587: astore 6
    //   589: aload 4
    //   591: ifnull +13 -> 604
    //   594: aload 4
    //   596: aload_0
    //   597: bipush 8
    //   599: invokeinterface 557 3 0
    //   604: getstatic 449	org/eclipse/osgi/framework/debug/Debug:DEBUG_BUNDLE_TIME	Z
    //   607: ifeq +43 -> 650
    //   610: getstatic 448	java/lang/System:out	Ljava/io/PrintStream;
    //   613: new 224	java/lang/StringBuffer
    //   616: dup
    //   617: ldc_w 209
    //   620: invokespecial 480	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   623: aload_0
    //   624: invokevirtual 511	org/eclipse/osgi/framework/internal/core/BundleHost:getSymbolicName	()Ljava/lang/String;
    //   627: invokevirtual 484	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   630: ldc_w 202
    //   633: invokevirtual 484	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   636: invokestatic 485	java/lang/System:currentTimeMillis	()J
    //   639: lload_2
    //   640: lsub
    //   641: invokevirtual 482	java/lang/StringBuffer:append	(J)Ljava/lang/StringBuffer;
    //   644: invokevirtual 479	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   647: invokevirtual 472	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   650: aload 6
    //   652: athrow
    //   653: aload 4
    //   655: ifnull +13 -> 668
    //   658: aload 4
    //   660: aload_0
    //   661: bipush 8
    //   663: invokeinterface 557 3 0
    //   668: getstatic 449	org/eclipse/osgi/framework/debug/Debug:DEBUG_BUNDLE_TIME	Z
    //   671: ifeq +43 -> 714
    //   674: getstatic 448	java/lang/System:out	Ljava/io/PrintStream;
    //   677: new 224	java/lang/StringBuffer
    //   680: dup
    //   681: ldc_w 209
    //   684: invokespecial 480	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   687: aload_0
    //   688: invokevirtual 511	org/eclipse/osgi/framework/internal/core/BundleHost:getSymbolicName	()Ljava/lang/String;
    //   691: invokevirtual 484	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   694: ldc_w 202
    //   697: invokevirtual 484	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   700: invokestatic 485	java/lang/System:currentTimeMillis	()J
    //   703: lload_2
    //   704: lsub
    //   705: invokevirtual 482	java/lang/StringBuffer:append	(J)Ljava/lang/StringBuffer;
    //   708: invokevirtual 479	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   711: invokevirtual 472	java/io/PrintStream:println	(Ljava/lang/String;)V
    //   714: aload_0
    //   715: getfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   718: iconst_1
    //   719: if_icmpne +40 -> 759
    //   722: aload_0
    //   723: getfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   726: invokevirtual 493	org/eclipse/osgi/framework/internal/core/BundleContextImpl:close	()V
    //   729: aload_0
    //   730: aconst_null
    //   731: putfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   734: new 254	org/osgi/framework/BundleException
    //   737: dup
    //   738: getstatic 471	org/eclipse/osgi/framework/internal/core/Msg:BUNDLE_UNINSTALLED_EXCEPTION	Ljava/lang/String;
    //   741: aload_0
    //   742: invokevirtual 512	org/eclipse/osgi/framework/internal/core/BundleHost:getBundleData	()Lorg/eclipse/osgi/framework/adaptor/BundleData;
    //   745: invokeinterface 554 1 0
    //   750: invokestatic 545	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
    //   753: bipush 7
    //   755: invokespecial 548	org/osgi/framework/BundleException:<init>	(Ljava/lang/String;I)V
    //   758: athrow
    //   759: return
    // Line number table:
    //   Java source line #302	-> byte code offset #0
    //   Java source line #303	-> byte code offset #6
    //   Java source line #304	-> byte code offset #12
    //   Java source line #305	-> byte code offset #28
    //   Java source line #306	-> byte code offset #34
    //   Java source line #308	-> byte code offset #64
    //   Java source line #309	-> byte code offset #84
    //   Java source line #310	-> byte code offset #85
    //   Java source line #311	-> byte code offset #102
    //   Java source line #313	-> byte code offset #115
    //   Java source line #315	-> byte code offset #123
    //   Java source line #317	-> byte code offset #144
    //   Java source line #320	-> byte code offset #145
    //   Java source line #322	-> byte code offset #153
    //   Java source line #323	-> byte code offset #175
    //   Java source line #324	-> byte code offset #180
    //   Java source line #326	-> byte code offset #181
    //   Java source line #327	-> byte code offset #194
    //   Java source line #328	-> byte code offset #195
    //   Java source line #333	-> byte code offset #212
    //   Java source line #335	-> byte code offset #232
    //   Java source line #337	-> byte code offset #241
    //   Java source line #339	-> byte code offset #247
    //   Java source line #340	-> byte code offset #251
    //   Java source line #342	-> byte code offset #262
    //   Java source line #345	-> byte code offset #263
    //   Java source line #346	-> byte code offset #269
    //   Java source line #349	-> byte code offset #324
    //   Java source line #350	-> byte code offset #331
    //   Java source line #353	-> byte code offset #340
    //   Java source line #355	-> byte code offset #346
    //   Java source line #356	-> byte code offset #350
    //   Java source line #357	-> byte code offset #361
    //   Java source line #358	-> byte code offset #365
    //   Java source line #362	-> byte code offset #374
    //   Java source line #366	-> byte code offset #375
    //   Java source line #367	-> byte code offset #381
    //   Java source line #368	-> byte code offset #392
    //   Java source line #370	-> byte code offset #400
    //   Java source line #372	-> byte code offset #402
    //   Java source line #373	-> byte code offset #416
    //   Java source line #374	-> byte code offset #421
    //   Java source line #375	-> byte code offset #430
    //   Java source line #376	-> byte code offset #436
    //   Java source line #377	-> byte code offset #440
    //   Java source line #381	-> byte code offset #466
    //   Java source line #382	-> byte code offset #473
    //   Java source line #383	-> byte code offset #477
    //   Java source line #384	-> byte code offset #487
    //   Java source line #386	-> byte code offset #493
    //   Java source line #387	-> byte code offset #499
    //   Java source line #390	-> byte code offset #519
    //   Java source line #391	-> byte code offset #523
    //   Java source line #394	-> byte code offset #535
    //   Java source line #396	-> byte code offset #537
    //   Java source line #397	-> byte code offset #543
    //   Java source line #399	-> byte code offset #554
    //   Java source line #400	-> byte code offset #558
    //   Java source line #401	-> byte code offset #565
    //   Java source line #403	-> byte code offset #570
    //   Java source line #406	-> byte code offset #575
    //   Java source line #407	-> byte code offset #584
    //   Java source line #408	-> byte code offset #587
    //   Java source line #409	-> byte code offset #589
    //   Java source line #410	-> byte code offset #594
    //   Java source line #411	-> byte code offset #604
    //   Java source line #412	-> byte code offset #610
    //   Java source line #414	-> byte code offset #650
    //   Java source line #409	-> byte code offset #653
    //   Java source line #410	-> byte code offset #658
    //   Java source line #411	-> byte code offset #668
    //   Java source line #412	-> byte code offset #674
    //   Java source line #416	-> byte code offset #714
    //   Java source line #417	-> byte code offset #722
    //   Java source line #418	-> byte code offset #729
    //   Java source line #419	-> byte code offset #734
    //   Java source line #421	-> byte code offset #759
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	760	0	this	BundleHost
    //   0	760	1	options	int
    //   122	13	2	msg	String
    //   180	10	2	e	IllegalStateException
    //   194	11	2	e	org.eclipse.osgi.service.resolver.ResolverHookException
    //   401	303	2	start	long
    //   414	245	4	bundleStats	org.eclipse.osgi.framework.adaptor.BundleWatcher
    //   535	50	5	e	BundleException
    //   587	64	6	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   153	180	180	java/lang/IllegalStateException
    //   153	180	194	org/eclipse/osgi/service/resolver/ResolverHookException
    //   466	532	535	org/osgi/framework/BundleException
    //   466	587	587	finally
  }
  
  protected void startHook()
    throws BundleException
  {}
  
  protected boolean readyToResume()
  {
    if (getInternalStartLevel() > framework.startLevelManager.getStartLevel()) {
      return false;
    }
    int status = bundledata.getStatus();
    if ((status & 0x1) == 0) {
      return false;
    }
    if (((status & 0x4) == 0) || ((status & 0x2) == 0) || (isLazyTriggerSet())) {
      return true;
    }
    if (!isResolved()) {
      if (!framework.getAdaptor().getState().isResolved())
      {
        if (framework.packageAdmin.resolveBundles(new Bundle[] { this })) {}
      }
      else {
        return false;
      }
    }
    state = 8;
    
    completeStateChange();
    framework.publishBundleEvent(512, this);
    return false;
  }
  
  private synchronized boolean isLazyTriggerSet()
  {
    if (proxy == null) {
      return false;
    }
    BundleLoader loader = proxy.getBasicBundleLoader();
    return loader != null ? loader.isLazyTriggerSet() : false;
  }
  
  protected BundleContextImpl createContext()
  {
    return new BundleContextImpl(this);
  }
  
  protected synchronized BundleContextImpl getContext()
  {
    if (context == null) {
      if ((state & 0x38) != 0) {
        context = createContext();
      }
    }
    return context;
  }
  
  /* Error */
  protected void stopWorker(int options)
    throws BundleException
  {
    // Byte code:
    //   0: iload_1
    //   1: iconst_1
    //   2: iand
    //   3: ifne +51 -> 54
    //   6: aload_0
    //   7: iconst_1
    //   8: iconst_0
    //   9: invokevirtual 509	org/eclipse/osgi/framework/internal/core/BundleHost:setStatus	(IZ)V
    //   12: aload_0
    //   13: iconst_4
    //   14: iconst_0
    //   15: invokevirtual 509	org/eclipse/osgi/framework/internal/core/BundleHost:setStatus	(IZ)V
    //   18: getstatic 451	org/eclipse/osgi/framework/debug/Debug:MONITOR_ACTIVATION	Z
    //   21: ifeq +33 -> 54
    //   24: new 219	java/lang/Exception
    //   27: dup
    //   28: new 224	java/lang/StringBuffer
    //   31: dup
    //   32: ldc_w 207
    //   35: invokespecial 480	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   38: aload_0
    //   39: invokevirtual 512	org/eclipse/osgi/framework/internal/core/BundleHost:getBundleData	()Lorg/eclipse/osgi/framework/adaptor/BundleData;
    //   42: invokevirtual 483	java/lang/StringBuffer:append	(Ljava/lang/Object;)Ljava/lang/StringBuffer;
    //   45: invokevirtual 479	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   48: invokespecial 476	java/lang/Exception:<init>	(Ljava/lang/String;)V
    //   51: invokevirtual 475	java/lang/Exception:printStackTrace	()V
    //   54: aload_0
    //   55: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   58: getfield 462	org/eclipse/osgi/framework/internal/core/Framework:active	Z
    //   61: ifeq +237 -> 298
    //   64: aload_0
    //   65: getfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   68: bipush 22
    //   70: iand
    //   71: ifeq +4 -> 75
    //   74: return
    //   75: aload_0
    //   76: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   79: getfield 463	org/eclipse/osgi/framework/internal/core/Framework:adaptor	Lorg/eclipse/osgi/framework/adaptor/FrameworkAdaptor;
    //   82: invokeinterface 558 1 0
    //   87: astore_2
    //   88: aload_2
    //   89: ifnull +12 -> 101
    //   92: aload_2
    //   93: aload_0
    //   94: bipush 16
    //   96: invokeinterface 557 3 0
    //   101: aload_0
    //   102: bipush 16
    //   104: putfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   107: aload_0
    //   108: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   111: sipush 256
    //   114: aload_0
    //   115: invokevirtual 523	org/eclipse/osgi/framework/internal/core/Framework:publishBundleEvent	(ILorg/osgi/framework/Bundle;)V
    //   118: aload_0
    //   119: getfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   122: ifnull +96 -> 218
    //   125: aload_0
    //   126: getfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   129: invokevirtual 495	org/eclipse/osgi/framework/internal/core/BundleContextImpl:stop	()V
    //   132: goto +86 -> 218
    //   135: astore_3
    //   136: aload_0
    //   137: invokevirtual 506	org/eclipse/osgi/framework/internal/core/BundleHost:stopHook	()V
    //   140: aload_0
    //   141: getfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   144: ifnull +15 -> 159
    //   147: aload_0
    //   148: getfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   151: invokevirtual 493	org/eclipse/osgi/framework/internal/core/BundleContextImpl:close	()V
    //   154: aload_0
    //   155: aconst_null
    //   156: putfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   159: aload_0
    //   160: invokevirtual 503	org/eclipse/osgi/framework/internal/core/BundleHost:checkValid	()V
    //   163: aload_0
    //   164: iconst_4
    //   165: putfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   168: getstatic 450	org/eclipse/osgi/framework/debug/Debug:DEBUG_GENERAL	Z
    //   171: ifeq +23 -> 194
    //   174: new 224	java/lang/StringBuffer
    //   177: dup
    //   178: ldc_w 205
    //   181: invokespecial 480	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   184: aload_0
    //   185: invokevirtual 483	java/lang/StringBuffer:append	(Ljava/lang/Object;)Ljava/lang/StringBuffer;
    //   188: invokevirtual 479	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   191: invokestatic 489	org/eclipse/osgi/framework/debug/Debug:println	(Ljava/lang/String;)V
    //   194: aload_0
    //   195: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   198: iconst_4
    //   199: aload_0
    //   200: invokevirtual 523	org/eclipse/osgi/framework/internal/core/Framework:publishBundleEvent	(ILorg/osgi/framework/Bundle;)V
    //   203: aload_2
    //   204: ifnull +12 -> 216
    //   207: aload_2
    //   208: aload_0
    //   209: bipush 32
    //   211: invokeinterface 557 3 0
    //   216: aload_3
    //   217: athrow
    //   218: aload_0
    //   219: invokevirtual 506	org/eclipse/osgi/framework/internal/core/BundleHost:stopHook	()V
    //   222: aload_0
    //   223: getfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   226: ifnull +15 -> 241
    //   229: aload_0
    //   230: getfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   233: invokevirtual 493	org/eclipse/osgi/framework/internal/core/BundleContextImpl:close	()V
    //   236: aload_0
    //   237: aconst_null
    //   238: putfield 457	org/eclipse/osgi/framework/internal/core/BundleHost:context	Lorg/eclipse/osgi/framework/internal/core/BundleContextImpl;
    //   241: aload_0
    //   242: invokevirtual 503	org/eclipse/osgi/framework/internal/core/BundleHost:checkValid	()V
    //   245: aload_0
    //   246: iconst_4
    //   247: putfield 454	org/eclipse/osgi/framework/internal/core/BundleHost:state	I
    //   250: getstatic 450	org/eclipse/osgi/framework/debug/Debug:DEBUG_GENERAL	Z
    //   253: ifeq +23 -> 276
    //   256: new 224	java/lang/StringBuffer
    //   259: dup
    //   260: ldc_w 205
    //   263: invokespecial 480	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   266: aload_0
    //   267: invokevirtual 483	java/lang/StringBuffer:append	(Ljava/lang/Object;)Ljava/lang/StringBuffer;
    //   270: invokevirtual 479	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   273: invokestatic 489	org/eclipse/osgi/framework/debug/Debug:println	(Ljava/lang/String;)V
    //   276: aload_0
    //   277: getfield 459	org/eclipse/osgi/framework/internal/core/BundleHost:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   280: iconst_4
    //   281: aload_0
    //   282: invokevirtual 523	org/eclipse/osgi/framework/internal/core/Framework:publishBundleEvent	(ILorg/osgi/framework/Bundle;)V
    //   285: aload_2
    //   286: ifnull +12 -> 298
    //   289: aload_2
    //   290: aload_0
    //   291: bipush 32
    //   293: invokeinterface 557 3 0
    //   298: return
    // Line number table:
    //   Java source line #490	-> byte code offset #0
    //   Java source line #491	-> byte code offset #6
    //   Java source line #492	-> byte code offset #12
    //   Java source line #493	-> byte code offset #18
    //   Java source line #494	-> byte code offset #24
    //   Java source line #496	-> byte code offset #54
    //   Java source line #497	-> byte code offset #64
    //   Java source line #498	-> byte code offset #74
    //   Java source line #501	-> byte code offset #75
    //   Java source line #502	-> byte code offset #88
    //   Java source line #503	-> byte code offset #92
    //   Java source line #505	-> byte code offset #101
    //   Java source line #506	-> byte code offset #107
    //   Java source line #509	-> byte code offset #118
    //   Java source line #510	-> byte code offset #125
    //   Java source line #511	-> byte code offset #135
    //   Java source line #512	-> byte code offset #136
    //   Java source line #513	-> byte code offset #140
    //   Java source line #514	-> byte code offset #147
    //   Java source line #515	-> byte code offset #154
    //   Java source line #518	-> byte code offset #159
    //   Java source line #520	-> byte code offset #163
    //   Java source line #522	-> byte code offset #168
    //   Java source line #523	-> byte code offset #174
    //   Java source line #526	-> byte code offset #194
    //   Java source line #527	-> byte code offset #203
    //   Java source line #528	-> byte code offset #207
    //   Java source line #530	-> byte code offset #216
    //   Java source line #512	-> byte code offset #218
    //   Java source line #513	-> byte code offset #222
    //   Java source line #514	-> byte code offset #229
    //   Java source line #515	-> byte code offset #236
    //   Java source line #518	-> byte code offset #241
    //   Java source line #520	-> byte code offset #245
    //   Java source line #522	-> byte code offset #250
    //   Java source line #523	-> byte code offset #256
    //   Java source line #526	-> byte code offset #276
    //   Java source line #527	-> byte code offset #285
    //   Java source line #528	-> byte code offset #289
    //   Java source line #532	-> byte code offset #298
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	299	0	this	BundleHost
    //   0	299	1	options	int
    //   87	203	2	bundleStats	org.eclipse.osgi.framework.adaptor.BundleWatcher
    //   135	82	3	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   118	135	135	finally
  }
  
  protected void stopHook()
    throws BundleException
  {}
  
  public ServiceReference<?>[] getRegisteredServices()
  {
    checkValid();
    if (context == null) {
      return null;
    }
    return context.getFramework().getServiceRegistry().getRegisteredServices(context);
  }
  
  public ServiceReference<?>[] getServicesInUse()
  {
    checkValid();
    if (context == null) {
      return null;
    }
    return context.getFramework().getServiceRegistry().getServicesInUse(context);
  }
  
  public BundleFragment[] getFragments()
  {
    synchronized (framework.bundles)
    {
      if (fragments == null) {
        return null;
      }
      BundleFragment[] result = new BundleFragment[fragments.length];
      System.arraycopy(fragments, 0, result, 0, result.length);
      return result;
    }
  }
  
  protected void attachFragment(BundleFragment fragment)
    throws BundleException
  {
    BundleLoader loader = getLoaderProxy().getBasicBundleLoader();
    if (loader != null) {
      loader.attachFragment(fragment);
    }
    if (fragments == null)
    {
      fragments = new BundleFragment[] { fragment };
    }
    else
    {
      boolean inserted = false;
      
      BundleFragment[] newFragments = new BundleFragment[fragments.length + 1];
      for (int i = 0; i < fragments.length; i++)
      {
        if (fragment == fragments[i]) {
          return;
        }
        fragments[i].manifestLocalization = null;
        if ((!inserted) && (fragment.getBundleId() < fragments[i].getBundleId()))
        {
          if (loader != null) {
            throw new BundleException(NLS.bind(Msg.BUNDLE_LOADER_ATTACHMENT_ERROR, fragments[i].getSymbolicName(), getSymbolicName()), 2);
          }
          newFragments[i] = fragment;
          inserted = true;
        }
        newFragments[(inserted ? i + 1 : i)] = fragments[i];
      }
      if (!inserted) {
        newFragments[(newFragments.length - 1)] = fragment;
      }
      fragments = newFragments;
    }
    manifestLocalization = null;
  }
  
  protected BundleLoader getBundleLoader()
  {
    BundleLoaderProxy curProxy = getLoaderProxy();
    return curProxy == null ? null : curProxy.getBundleLoader();
  }
  
  public synchronized BundleLoaderProxy getLoaderProxy()
  {
    if (proxy != null) {
      return proxy;
    }
    BundleDescription bundleDescriptio
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 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84

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