org.eclipse.osgi_3.7.2.v20120110-1415

RICT_MODE = "strict";
  public static final String DEVELOPMENT_MODE = "development";
  public static final String STATE_SYSTEM_BUNDLE = "osgi.system.bundle";
  public static final String PROP_OSGI_RELAUNCH = "osgi.framework.relaunch";
  
  public static String getInternalSymbolicName()
  {
    return INTERNAL_SYSTEM_BUNDLE;
  }
  
  static void setInternalSymbolicName(String name)
  {
    INTERNAL_SYSTEM_BUNDLE = name;
  }
  
  public static String OSGI_COMPATIBILITY_BOOTDELEGATION = "osgi.compatibility.bootdelegation";
  public static final String ECLIPSE_SYSTEMBUNDLE = "Eclipse-SystemBundle";
  public static final String ECLIPSE_PLATFORMFILTER = "Eclipse-PlatformFilter";
  public static final String Eclipse_JREBUNDLE = "Eclipse-JREBundle";
  public static final String INTERNAL_DIRECTIVE = "x-internal";
  public static final String FRIENDS_DIRECTIVE = "x-friends";
  /**
   * @deprecated
   */
  public static final String PROVIDE_PACKAGE = "Provide-Package";
  /**
   * @deprecated
   */
  public static final String REPROVIDE_ATTRIBUTE = "reprovide";
  /**
   * @deprecated
   */
  public static final String OPTIONAL_ATTRIBUTE = "optional";
  public static final String BUDDY_LOADER = "Eclipse-BuddyPolicy";
  public static final String REGISTERED_POLICY = "Eclipse-RegisterBuddy";
  public static final String INTERNAL_HANDLER_PKGS = "equinox.interal.handler.pkgs";
  public static final String PLUGIN_CLASS = "Plugin-Class";
  public static final String ECLIPSE_LAZYSTART = "Eclipse-LazyStart";
  public static final String ECLIPSE_LAZYSTART_EXCEPTIONS = "exceptions";
  /**
   * @deprecated
   */
  public static final String ECLIPSE_AUTOSTART = "Eclipse-AutoStart";
  /**
   * @deprecated
   */
  public static final String ECLIPSE_AUTOSTART_EXCEPTIONS = "exceptions";
  public static final String REFRESH_DUPLICATE_BSN = "equinox.refresh.duplicate.bsn";
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.framework.internal.core.Constants
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.framework.internal.core;

import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.eclipse.osgi.framework.debug.Debug;
import org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl;
import org.eclipse.osgi.internal.serviceregistry.ShrinkableCollection;
import org.osgi.framework.hooks.resolver.ResolverHook;
import org.osgi.framework.wiring.BundleCapability;
import org.osgi.framework.wiring.BundleRequirement;
import org.osgi.framework.wiring.BundleRevision;

class CoreResolverHookFactory$CoreResolverHook
  implements ResolverHook
{
  private final List<CoreResolverHookFactory.HookReference> hooks;
  final CoreResolverHookFactory this$0;
  
  CoreResolverHookFactory$CoreResolverHook(List<CoreResolverHookFactory.HookReference> arg1)
  {
    this.hooks = hooks;
  }
  
  public void filterResolvable(Collection<BundleRevision> candidates)
  {
    if (Debug.DEBUG_HOOKS) {
      Debug.println("ResolverHook.filterResolvable(" + candidates + ")");
    }
    if (hooks.isEmpty()) {
      return;
    }
    candidates = new ShrinkableCollection(candidates);
    for (Iterator<CoreResolverHookFactory.HookReference> iHooks = hooks.iterator(); iHooks.hasNext();)
    {
      CoreResolverHookFactory.HookReference hookRef = (CoreResolverHookFactory.HookReference)iHooks.next();
      if (reference.getBundle() == null) {
        this$0.handleHookException(null, hook, "filterResolvable", reference.getBundle(), hooks, true);
      } else {
        try
        {
          hook.filterResolvable(candidates);
        }
        catch (Throwable t)
        {
          this$0.handleHookException(t, hook, "filterResolvable", reference.getBundle(), hooks, true);
        }
      }
    }
  }
  
  public void filterSingletonCollisions(BundleCapability singleton, Collection<BundleCapability> collisionCandidates)
  {
    if (Debug.DEBUG_HOOKS) {
      Debug.println("ResolverHook.filterSingletonCollisions(" + singleton + ", " + collisionCandidates + ")");
    }
    if (hooks.isEmpty()) {
      return;
    }
    collisionCandidates = new ShrinkableCollection(collisionCandidates);
    for (Iterator<CoreResolverHookFactory.HookReference> iHooks = hooks.iterator(); iHooks.hasNext();)
    {
      CoreResolverHookFactory.HookReference hookRef = (CoreResolverHookFactory.HookReference)iHooks.next();
      if (reference.getBundle() == null) {
        this$0.handleHookException(null, hook, "filterSingletonCollisions", reference.getBundle(), hooks, true);
      } else {
        try
        {
          hook.filterSingletonCollisions(singleton, collisionCandidates);
        }
        catch (Throwable t)
        {
          this$0.handleHookException(t, hook, "filterSingletonCollisions", reference.getBundle(), hooks, true);
        }
      }
    }
  }
  
  public void filterMatches(BundleRequirement requirement, Collection<BundleCapability> candidates)
  {
    if (Debug.DEBUG_HOOKS) {
      Debug.println("ResolverHook.filterMatches(" + requirement + ", " + candidates + ")");
    }
    if (hooks.isEmpty()) {
      return;
    }
    candidates = new ShrinkableCollection(candidates);
    for (Iterator<CoreResolverHookFactory.HookReference> iHooks = hooks.iterator(); iHooks.hasNext();)
    {
      CoreResolverHookFactory.HookReference hookRef = (CoreResolverHookFactory.HookReference)iHooks.next();
      if (reference.getBundle() == null) {
        this$0.handleHookException(null, hook, "filterMatches", reference.getBundle(), hooks, true);
      } else {
        try
        {
          hook.filterMatches(requirement, candidates);
        }
        catch (Throwable t)
        {
          this$0.handleHookException(t, hook, "filterMatches", reference.getBundle(), hooks, true);
        }
      }
    }
  }
  
  public void end()
  {
    if (Debug.DEBUG_HOOKS) {
      Debug.println("ResolverHook.end");
    }
    if (hooks.isEmpty()) {
      return;
    }
    for (Iterator<CoreResolverHookFactory.HookReference> iHooks = hooks.iterator(); iHooks.hasNext();)
    {
      CoreResolverHookFactory.HookReference hookRef = (CoreResolverHookFactory.HookReference)iHooks.next();
      if (reference.getBundle() != null) {
        try
        {
          hook.end();
        }
        catch (Throwable t)
        {
          this$0.handleHookException(t, hook, "end", reference.getBundle(), hooks, false);
        }
      }
    }
    this$0.releaseHooks(hooks);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.framework.internal.core.CoreResolverHookFactory.CoreResolverHook
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.framework.internal.core;

import org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl;
import org.osgi.framework.hooks.resolver.ResolverHook;
import org.osgi.framework.hooks.resolver.ResolverHookFactory;

class CoreResolverHookFactory$HookReference
{
  final ServiceReferenceImpl<ResolverHookFactory> reference;
  final ResolverHook hook;
  
  public CoreResolverHookFactory$HookReference(ServiceReferenceImpl<ResolverHookFactory> reference, ResolverHook hook)
  {
    this.reference = reference;
    this.hook = hook;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.framework.internal.core.CoreResolverHookFactory.HookReference
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.framework.internal.core;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.eclipse.osgi.framework.debug.Debug;
import org.eclipse.osgi.internal.serviceregistry.ServiceReferenceImpl;
import org.eclipse.osgi.internal.serviceregistry.ServiceRegistry;
import org.eclipse.osgi.internal.serviceregistry.ShrinkableCollection;
import org.eclipse.osgi.service.resolver.ResolverHookException;
import org.eclipse.osgi.util.NLS;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
import org.osgi.framework.InvalidSyntaxException;
import org.osgi.framework.hooks.resolver.ResolverHook;
import org.osgi.framework.hooks.resolver.ResolverHookFactory;
import org.osgi.framework.wiring.BundleCapability;
import org.osgi.framework.wiring.BundleRequirement;
import org.osgi.framework.wiring.BundleRevision;

public class CoreResolverHookFactory
  implements ResolverHookFactory
{
  private final BundleContextImpl context;
  private final ServiceRegistry registry;
  
  static class HookReference
  {
    final ServiceReferenceImpl<ResolverHookFactory> reference;
    final ResolverHook hook;
    
    public HookReference(ServiceReferenceImpl<ResolverHookFactory> reference, ResolverHook hook)
    {
      this.reference = reference;
      this.hook = hook;
    }
  }
  
  public CoreResolverHookFactory(BundleContextImpl context, ServiceRegistry registry)
  {
    this.context = context;
    this.registry = registry;
  }
  
  void handleHookException(Throwable t, Object hook, String method, Bundle hookBundle, List<HookReference> hookRefs, boolean causeFailure)
  {
    if (Debug.DEBUG_HOOKS)
    {
      Debug.println(hook.getClass().getName() + "." + method + "() exception:");
      if (t != null) {
        Debug.printStackTrace(t);
      }
    }
    String message = NLS.bind(Msg.SERVICE_FACTORY_EXCEPTION, hook.getClass().getName(), method);
    if (causeFailure)
    {
      releaseHooks(hookRefs);
      throw new ResolverHookException(message, t);
    }
    BundleException be = new BundleException(message, 12, t);
    context.framework.publishFrameworkEvent(2, hookBundle, be);
  }
  
  private ServiceReferenceImpl<ResolverHookFactory>[] getHookReferences()
  {
    try
    {
      return registry.getServiceReferences(context, ResolverHookFactory.class.getName(), null, false, false);
    }
    catch (InvalidSyntaxException localInvalidSyntaxException) {}
    return null;
  }
  
  public ResolverHook begin(Collection<BundleRevision> triggers)
  {
    if (Debug.DEBUG_HOOKS) {
      Debug.println("ResolverHook.begin");
    }
    ServiceReferenceImpl[] refs = getHookReferences();
    
    List<HookReference> hookRefs = refs == null ? Collections.EMPTY_LIST : new ArrayList(refs.length);
    if (refs != null)
    {
      ServiceReferenceImpl[] arrayOfServiceReferenceImpl1;
      int j = (arrayOfServiceReferenceImpl1 = refs).length;
      for (int i = 0; i < j; i++)
      {
        ServiceReferenceImpl<ResolverHookFactory> hookRef = arrayOfServiceReferenceImpl1[i];
        ResolverHookFactory factory = (ResolverHookFactory)context.getService(hookRef);
        if (factory != null) {
          try
          {
            ResolverHook hook = factory.begin(triggers);
            if (hook != null) {
              hookRefs.add(new HookReference(hookRef, hook));
            }
          }
          catch (Throwable t)
          {
            handleHookException(t, factory, "begin", hookRef.getBundle(), hookRefs, true);
          }
        }
      }
    }
    return new CoreResolverHook(hookRefs);
  }
  
  void releaseHooks(List<HookReference> hookRefs)
  {
    for (Iterator localIterator = hookRefs.iterator(); localIterator.hasNext();)
    {
      HookReference hookRef = (HookReference)localIterator.next();
      context.ungetService(reference);
    }
    hookRefs.clear();
  }
  
  class CoreResolverHook
    implements ResolverHook
  {
    private final List<CoreResolverHookFactory.HookReference> hooks;
    
    CoreResolverHook()
    {
      this.hooks = hooks;
    }
    
    public void filterResolvable(Collection<BundleRevision> candidates)
    {
      if (Debug.DEBUG_HOOKS) {
        Debug.println("ResolverHook.filterResolvable(" + candidates + ")");
      }
      if (hooks.isEmpty()) {
        return;
      }
      candidates = new ShrinkableCollection(candidates);
      for (Iterator<CoreResolverHookFactory.HookReference> iHooks = hooks.iterator(); iHooks.hasNext();)
      {
        CoreResolverHookFactory.HookReference hookRef = (CoreResolverHookFactory.HookReference)iHooks.next();
        if (reference.getBundle() == null) {
          handleHookException(null, hook, "filterResolvable", reference.getBundle(), hooks, true);
        } else {
          try
          {
            hook.filterResolvable(candidates);
          }
          catch (Throwable t)
          {
            handleHookException(t, hook, "filterResolvable", reference.getBundle(), hooks, true);
          }
        }
      }
    }
    
    public void filterSingletonCollisions(BundleCapability singleton, Collection<BundleCapability> collisionCandidates)
    {
      if (Debug.DEBUG_HOOKS) {
        Debug.println("ResolverHook.filterSingletonCollisions(" + singleton + ", " + collisionCandidates + ")");
      }
      if (hooks.isEmpty()) {
        return;
      }
      collisionCandidates = new ShrinkableCollection(collisionCandidates);
      for (Iterator<CoreResolverHookFactory.HookReference> iHooks = hooks.iterator(); iHooks.hasNext();)
      {
        CoreResolverHookFactory.HookReference hookRef = (CoreResolverHookFactory.HookReference)iHooks.next();
        if (reference.getBundle() == null) {
          handleHookException(null, hook, "filterSingletonCollisions", reference.getBundle(), hooks, true);
        } else {
          try
          {
            hook.filterSingletonCollisions(singleton, collisionCandidates);
          }
          catch (Throwable t)
          {
            handleHookException(t, hook, "filterSingletonCollisions", reference.getBundle(), hooks, true);
          }
        }
      }
    }
    
    public void filterMatches(BundleRequirement requirement, Collection<BundleCapability> candidates)
    {
      if (Debug.DEBUG_HOOKS) {
        Debug.println("ResolverHook.filterMatches(" + requirement + ", " + candidates + ")");
      }
      if (hooks.isEmpty()) {
        return;
      }
      candidates = new ShrinkableCollection(candidates);
      for (Iterator<CoreResolverHookFactory.HookReference> iHooks = hooks.iterator(); iHooks.hasNext();)
      {
        CoreResolverHookFactory.HookReference hookRef = (CoreResolverHookFactory.HookReference)iHooks.next();
        if (reference.getBundle() == null) {
          handleHookException(null, hook, "filterMatches", reference.getBundle(), hooks, true);
        } else {
          try
          {
            hook.filterMatches(requirement, candidates);
          }
          catch (Throwable t)
          {
            handleHookException(t, hook, "filterMatches", reference.getBundle(), hooks, true);
          }
        }
      }
    }
    
    public void end()
    {
      if (Debug.DEBUG_HOOKS) {
        Debug.println("ResolverHook.end");
      }
      if (hooks.isEmpty()) {
        return;
      }
      for (Iterator<CoreResolverHookFactory.HookReference> iHooks = hooks.iterator(); iHooks.hasNext();)
      {
        CoreResolverHookFactory.HookReference hookRef = (CoreResolverHookFactory.HookReference)iHooks.next();
        if (reference.getBundle() != null) {
          try
          {
            hook.end();
          }
          catch (Throwable t)
          {
            handleHookException(t, hook, "end", reference.getBundle(), hooks, false);
          }
        }
      }
      releaseHooks(hooks);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.framework.internal.core.CoreResolverHookFactory
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.framework.internal.core;

import java.security.PrivilegedAction;

class EquinoxLauncher$1
  implements PrivilegedAction<Object>
{
  final EquinoxLauncher this$0;
  
  EquinoxLauncher$1(EquinoxLauncher paramEquinoxLauncher) {}
  
  public Object run()
  {
    this$0.internalInit();
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.framework.internal.core.EquinoxLauncher.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.framework.internal.core;

import java.security.PrivilegedExceptionAction;

class EquinoxLauncher$2
  implements PrivilegedExceptionAction<Object>
{
  final EquinoxLauncher this$0;
  
  EquinoxLauncher$2(EquinoxLauncher paramEquinoxLauncher) {}
  
  public Object run()
  {
    this$0.internalStart();
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.framework.internal.core.EquinoxLauncher.2
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.framework.internal.core;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.security.AccessController;
import java.security.PrivilegedAction;
import java.security.PrivilegedActionException;
import java.security.PrivilegedExceptionAction;
import java.security.cert.X509Certificate;
import java.util.Collections;
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.List;
import java.util.Map;
import org.osgi.framework.AdminPermission;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;
import org.osgi.framework.FrameworkEvent;
import org.osgi.framework.FrameworkListener;
import org.osgi.framework.ServiceReference;
import org.osgi.framework.Version;

public class EquinoxLauncher
  implements org.osgi.framework.launch.Framework
{
  private volatile Framework framework;
  private volatile Bundle systemBundle;
  private final Map<String, String> configuration;
  private volatile ConsoleManager consoleMgr = null;
  
  public EquinoxLauncher(Map<String, String> configuration)
  {
    this.configuration = configuration;
  }
  
  public void init()
  {
    checkAdminPermission("execute");
    if (System.getSecurityManager() == null) {
      internalInit();
    } else {
      AccessController.doPrivileged(new PrivilegedAction()
      {
        public Object run()
        {
          internalInit();
          return null;
        }
      });
    }
  }
  
  /* Error */
  synchronized Framework internalInit()
  {
    // Byte code:
    //   0: aload_0
    //   1: invokevirtual 371	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:getState	()I
    //   4: bipush 56
    //   6: iand
    //   7: ifeq +8 -> 15
    //   10: aload_0
    //   11: getfield 346	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   14: areturn
    //   15: invokestatic 361	java/lang/System:getSecurityManager	()Ljava/lang/SecurityManager;
    //   18: ifnull +27 -> 45
    //   21: aload_0
    //   22: getfield 344	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:configuration	Ljava/util/Map;
    //   25: ldc 7
    //   27: invokeinterface 394 2 0
    //   32: ifnull +13 -> 45
    //   35: new 174	java/lang/SecurityException
    //   38: dup
    //   39: ldc 1
    //   41: invokespecial 357	java/lang/SecurityException:<init>	(Ljava/lang/String;)V
    //   44: athrow
    //   45: aload_0
    //   46: getfield 346	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   49: astore_1
    //   50: aload_1
    //   51: ifnull +17 -> 68
    //   54: aload_1
    //   55: invokevirtual 382	org/eclipse/osgi/framework/internal/core/Framework:close	()V
    //   58: aload_0
    //   59: aconst_null
    //   60: putfield 346	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   63: aload_0
    //   64: aconst_null
    //   65: putfield 347	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:systemBundle	Lorg/osgi/framework/Bundle;
    //   68: invokestatic 364	java/lang/Thread:currentThread	()Ljava/lang/Thread;
    //   71: invokevirtual 362	java/lang/Thread:getContextClassLoader	()Ljava/lang/ClassLoader;
    //   74: astore_2
    //   75: aload_0
    //   76: getfield 344	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:configuration	Ljava/util/Map;
    //   79: invokestatic 387	org/eclipse/osgi/framework/internal/core/FrameworkProperties:setProperties	(Ljava/util/Map;)V
    //   82: invokestatic 386	org/eclipse/osgi/framework/internal/core/FrameworkProperties:initializeProperties	()V
    //   85: aload_0
    //   86: aload_0
    //   87: getfield 344	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:configuration	Ljava/util/Map;
    //   90: invokespecial 377	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:setEquinoxProperties	(Ljava/util/Map;)V
    //   93: new 190	org/eclipse/osgi/framework/internal/core/Framework
    //   96: dup
    //   97: new 184	org/eclipse/osgi/baseadaptor/BaseAdaptor
    //   100: dup
    //   101: iconst_0
    //   102: anewarray 176	java/lang/String
    //   105: invokespecial 368	org/eclipse/osgi/baseadaptor/BaseAdaptor:<init>	([Ljava/lang/String;)V
    //   108: invokespecial 384	org/eclipse/osgi/framework/internal/core/Framework:<init>	(Lorg/eclipse/osgi/framework/adaptor/FrameworkAdaptor;)V
    //   111: astore_1
    //   112: aload_0
    //   113: aload_1
    //   114: invokestatic 370	org/eclipse/osgi/framework/internal/core/ConsoleManager:startConsole	(Lorg/eclipse/osgi/framework/internal/core/Framework;)Lorg/eclipse/osgi/framework/internal/core/ConsoleManager;
    //   117: putfield 345	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:consoleMgr	Lorg/eclipse/osgi/framework/internal/core/ConsoleManager;
    //   120: aload_1
    //   121: invokevirtual 383	org/eclipse/osgi/framework/internal/core/Framework:launch	()V
    //   124: aload_0
    //   125: aload_1
    //   126: putfield 346	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:framework	Lorg/eclipse/osgi/framework/internal/core/Framework;
    //   129: aload_0
    //   130: aload_1
    //   131: getfield 348	org/eclipse/osgi/framework/internal/core/Framework:systemBundle	Lorg/eclipse/osgi/framework/internal/core/InternalSystemBundle;
    //   134: putfield 347	org/eclipse/osgi/framework/internal/core/EquinoxLauncher:systemBundle	Lorg/osgi/framework/Bundle;
    //   137: goto +27 -> 164
    //   140: astore_3
    //   141: invokestatic 364	java/lang/Thread:currentThread	()Ljava/lang/Thread;
    //   144: invokevirtual 362	java/lang/Thread:getContextClassLoader	()Ljava/lang/ClassLoader;
    //   147: astore 4
    //   149: aload 4
    //   151: aload_2
    //   152: if_acmpeq +10 -> 162
    //   155: invokestatic 364	java/lang/Thread:currentThread	()Ljava/lang/Thread;
    //   158: aload_2
    //   159: invokevirtual 363	java/lang/Thread:setContextClassLoader	(Ljava/lang/ClassLoader;)V
    //   162: aload_3
    //   163: athrow
    //   164: invokestatic 364	java/lang/Thread:currentThread	()Ljava/lang/Thread;
    //   167: invokevirtual 362	java/lang/Thread:getContextClassLoader	()Ljava/lang/ClassLoader;
    //   170: astore 4
    //   172: aload 4
    //   174: aload_2
    //   175: if_acmpeq +10 -> 185
    //   178: invokestatic 364	java/lang/Thread:currentThread	()Ljava/lang/Thread;
    //   181: aload_2
    //   182: invokevirtual 363	java/lang/Thread:setContextClassLoader	(Ljava/lang/ClassLoader;)V
    //   185: aload_1
    //   186: areturn
    // Line number table:
    //   Java source line #49	-> byte code offset #0
    //   Java source line #50	-> byte code offset #10
    //   Java source line #52	-> byte code offset #15
    //   Java source line #53	-> byte code offset #35
    //   Java source line #55	-> byte code offset #45
    //   Java source line #56	-> byte code offset #50
    //   Java source line #57	-> byte code offset #54
    //   Java source line #58	-> byte code offset #58
    //   Java source line #59	-> byte code offset #63
    //   Java source line #61	-> byte code offset #68
    //   Java source line #63	-> byte code offset #75
    //   Java source line #64	-> byte code offset #82
    //   Java source line #66	-> byte code offset #85
    //   Java source line #67	-> byte code offset #93
    //   Java source line #68	-> byte code offset #112
    //   Java source line #69	-> byte code offset #120
    //   Java source line #70	-> byte code offset #124
    //   Java source line #71	-> byte code offset #129
    //   Java source line #72	-> byte code offset #140
    //   Java source line #73	-> byte code offset #141
    //   Java source line #74	-> byte code offset #149
    //   Java source line #75	-> byte code offset #155
    //   Java source line #76	-> byte code offset #162
    //   Java source line #73	-> byte code offset #164
    //   Java source line #74	-> byte code offset #172
    //   Java source line #75	-> byte code offset #178
    //   Java source line #77	-> byte code offset #185
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	187	0	this	EquinoxLauncher
    //   49	137	1	current	Framework
    //   74	108	2	tccl	ClassLoader
    //   140	23	3	localObject	Object
    //   147	3	4	currentCCL	ClassLoader
    //   170	3	4	currentCCL	ClassLoader
    // Exception table:
    //   from	to	target	type
    //   75	140	140	finally
  }
  
  private void setEquinoxProperties(Map<String, String> configuration)
  {
    Object threadBehavior = configuration == null ? null : (String)configuration.get("osgi.framework.activeThreadType");
    if (threadBehavior == null)
    {
      if (FrameworkProperties.getProperty("osgi.framework.activeThreadType") == null) {
        FrameworkProperties.setProperty("osgi.framework.activeThreadType", "normal");
      }
    }
    else {
      FrameworkProperties.setProperty("osgi.framework.activeThreadType", (String)threadBehavior);
    }
    if (FrameworkProperties.getProperty(Constants.OSGI_COMPATIBILITY_BOOTDELEGATION) == null) {
      FrameworkProperties.setProperty(Constants.OSGI_COMPATIBILITY_BOOTDELEGATION, "false");
    }
    if (FrameworkProperties.getProperty("osgi.support.multipleHosts") == null) {
      FrameworkProperties.setProperty("osgi.support.multipleHosts", "true");
    }
    Object windowSystem = configuration == null ? null : (String)configuration.get("org.osgi.framework.windowsystem");
    if (windowSystem == null)
    {
      windowSystem = FrameworkProperties.getProperty("osgi.ws");
      if (windowSystem != null) {
        FrameworkProperties.setProperty("org.osgi.framework.windowsystem", (String)windowSystem);
      }
    }
    if (configuration == null) {
      return;
    }
    Object clean = configuration.get("org.osgi.framework.storage.clean");
    if ("onFirstInit".equals(clean))
    {
      configuration.remove("org.osgi.framework.storage.clean");
      FrameworkProperties.setProperty("osgi.clean", Boolean.TRUE.toString());
    }
  }
  
  public FrameworkEvent waitForStop(long timeout)
    throws InterruptedException
  {
    Framework current = framework;
    if (current == null) {
      return new FrameworkEvent(64, this, null);
    }
    return current.waitForStop(timeout);
  }
  
  public Enumeration<URL> findEntries(String path, String filePattern, boolean recurse)
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.findEntries(path, filePattern, recurse);
  }
  
  public BundleContext getBundleContext()
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.getBundleContext();
  }
  
  public long getBundleId()
  {
    return 0L;
  }
  
  public URL getEntry(String path)
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.getEntry(path);
  }
  
  public Enumeration<String> getEntryPaths(String path)
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.getEntryPaths(path);
  }
  
  public Dictionary<String, String> getHeaders()
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.getHeaders();
  }
  
  public Dictionary<String, String> getHeaders(String locale)
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.getHeaders(locale);
  }
  
  public long getLastModified()
  {
    Bundle current = systemBundle;
    if (current == null) {
      return System.currentTimeMillis();
    }
    return current.getLastModified();
  }
  
  public String getLocation()
  {
    return "System Bundle";
  }
  
  public ServiceReference<?>[] getRegisteredServices()
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.getRegisteredServices();
  }
  
  public URL getResource(String name)
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.getResource(name);
  }
  
  public Enumeration<URL> getResources(String name)
    throws IOException
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.getResources(name);
  }
  
  public ServiceReference<?>[] getServicesInUse()
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.getServicesInUse();
  }
  
  public int getState()
  {
    Bundle current = systemBundle;
    if (current == null) {
      return 2;
    }
    return current.getState();
  }
  
  public String getSymbolicName()
  {
    return "org.eclipse.osgi";
  }
  
  public boolean hasPermission(Object permission)
  {
    Bundle current = systemBundle;
    if (current == null) {
      return false;
    }
    return current.hasPermission(permission);
  }
  
  public Class<?> loadClass(String name)
    throws ClassNotFoundException
  {
    Bundle current = systemBundle;
    if (current == null) {
      return null;
    }
    return current.loadClass(name);
  }
  
  public void start(int options)
    throws BundleException
  {
    start();
  }
  
  public void start()
    throws BundleException
  {
    checkAdminPermission("execute");
    if (System.getSecurityManager() == null) {
      internalStart();
    } else {
      try
      {
        AccessController.doPrivileged(new PrivilegedExceptionAction()
        {
          public Object run()
          {
            internalStart();
            return null;
          }
        });
      }
      catch (PrivilegedActionException e)
      {
        throw ((BundleException)e.getException());
      }
    }
  }
  
  private void checkAdminPermission(String actions)
  {
    SecurityManager sm = System.getSecurityManager();
    if (sm != null) {
      sm.checkPermission(new AdminPermission(this, actions));
    }
  }
  
  void internalStart()
  {
    if (getState() == 32) {
      return;
    }
    Framework current = internalInit();
    int level = 1;
    try
    {
      level = Integer.parseInt((String)configuration.get("org.osgi.framework.startlevel.beginning"));
    }
    catch (Throwable localThrowable) {}
    startLevelManager.doSetStartLevel(level, new FrameworkListener[0]);
  }
  
  public void stop(int options)
    throws BundleException
  {
    stop();
  }
  
  public void stop()
    throws BundleException
  {
    Bundle current = systemBundle;
    if (current == null) {
      return;
    }
    ConsoleManager currentConsole = consoleMgr;
    if (currentConsole != null)
    {
      currentConsole.stopConsole();
      consoleMgr = null;
    }
    current.stop();
  }
  
  public void uninstall()
    throws BundleException
  {
    throw new BundleException(Msg.BUNDLE_SYSTEMBUNDLE_UNINSTALL_EXCEPTION, 2);
  }
  
  public void update()
    throws BundleException
  {
    Bundle current = systemBundle;
    if (current == null) {
      return;
    }
    current.update();
  }
  
  public void update(InputStream in)
    throws BundleException
  {
    try
    {
      in.close();
    }
    catch (IOException localIOException) {}
    update();
  }
  
  public Map<X509Certificate, List<X509Certificate>> getSignerCertificates(int signersType)
  {
    Bundle current = systemBundle;
    if (current != null) {
      return current.getSignerCertificates(signersType);
    }
    Map<X509Certificate, List<X509Certificate>> empty = Collections.EMPTY_MAP;
    return empty;
  }
  
  public Version getVersion()
  {
    Bundle current = systemBundle;
    if (current != null) {
      return current.getVersion();
    }
    return Version.emptyVersion;
  }
  
  public <A> A adapt(Class<A> adapterType)
  {
    Bundle current = systemBundle;
    if (current != null) {
      return (A)current.adapt(adapterType);
    }
    return null;
  }
  
  public int compareTo(Bundle o)
  {
    Bundle current = systemBundle;
    if (current != null) {
      return current.compareTo(o);
    }
    throw new IllegalStateException();
  }
  
  public File getDataFile(String filename)
  {
    Bundle current = systemBundle;
    if (current != null) {
      return current.getDataFile(filename);
    }
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.framework.internal.core.EquinoxLauncher
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.framework.internal.core;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.osgi.internal.loader.BundleLoader;
import org.eclipse.osgi.internal.loader.BundleLoaderProxy;
import org.eclipse.osgi.internal.loader.PackageSource;
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.eclipse.osgi.service.resolver.ExportPackageDescription;
import org.osgi.framework.Bundle;
import org.osgi.framework.Version;
import org.osgi.service.packageadmin.ExportedPackage;

/**
 * @deprecated
 */
public class ExportedPackageImpl
  implements ExportedPackage
{
  private final ExportPackageDescription exportedPackage;
  private final BundleLoaderProxy supplier;
  
  public ExportedPackageImpl(ExportPackageDescription exportedPackage, BundleLoaderProxy supplier)
  {
    this.exportedPackage = exportedPackage;
    this.supplier = supplier;
  }
  
  public String getName()
  {
    return exportedPackage.getName();
  }
  
  public Bundle getExportingBundle()
  {
    if (supplier.isStale()) {
      return null;
    }
    return supplier.getBundleHost();
  }
  
  AbstractBundle getBundle()
  {
    return supplier.getBundleHost();
  }
  
  public Bundle[] getImportingBundles()
  {
    if (supplier.isStale()) {
      return null;
    }
    AbstractBundle bundle = (AbstractBundle)getExportingBundle();
    if (bundle == null) {
      return null;
    }
    AbstractBundle[] bundles = framework.getAllBundles();
    List<Bundle> importers = new ArrayList(10);
    PackageSource supplierSource = supplier.createPackageSource(exportedPackage, false);
    for (int i = 0; i < bundles.length; i++) {
      if ((bundles[i] instanceof BundleHost))
      {
        BundleLoader loader = ((BundleHost)bundles[i]).getBundleLoader();
        if ((loader != null) && (loader.getBundle() != supplier.getBundle()))
        {
          PackageSource importerSource = loader.getPackageSource(getName());
          if ((supplierSource != null) && (supplierSource.hasCommonSource(importerSource))) {
            importers.add(bundles[i]);
          }
        }
      }
    }
    return (Bundle[])importers.toArray(new Bundle[importers.size()]);
  }
  
  /**
   * @deprecated
   */
  public String getSpecificationVersion()
  {
    return exportedPackage.getVersion().toString();
  }
  
  public Version getVersion()
  {
    return exportedPackage.getVersion();
  }
  
  public boolean isRemovalPending()
  {
    BundleDescription exporter = exportedPackage.getExporter();
    if (exporter != null) {
      return exporter.isRemovalPending();
    }
    return true;
  }
  
  public String toString()
  {
    StringBuffer result = new StringBuffer(getName());
    result.append("; ").append("version");
    result.append("=\"").append(exportedPackage.getVersion().toString()).append("\"");
    
    return result.toString();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.osgi.framework.internal.core.ExportedPackageImpl
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.osgi.framework.internal.core;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.osgi.util.NLS;
import org.osgi.framework.InvalidSyntaxException;

class FilterImpl$Parser
{
  private final String filterstring;
  private final char[] filterChars;
  private int pos;
  
  FilterImpl$Parser(String filterstring)
  {
    this.filterstring = filterstring;
    filterChars = filterstring.toCharArray();
    pos = 0;
  }
  
  FilterImpl parse()
    throws InvalidSyntaxException
  {
    try
    {
      filter = parse_filter();
    }
    catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException)
    {
      FilterImpl filter;
      throw new InvalidSyntaxException(Msg.FILTER_TERMINATED_ABRUBTLY, filterstring);
    }
    FilterImpl filter;
    if (pos != filterChars.length) {
      throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_TRAILING_CHARACTERS, filterstring.substring(pos)), filterstring);
    }
    return filter;
  }
  
  private FilterImpl parse_filter()
    throws InvalidSyntaxException
  {
    skipWhiteSpace();
    if (filterChars[pos] != '(') {
      throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_MISSING_LEFTPAREN, filterstring.substring(pos)), filterstring);
    }
    pos += 1;
    
    FilterImpl filter = parse_filtercomp();
    
    skipWhiteSpace();
    if (filterChars[pos] != ')') {
      throw new InvalidSyntaxException(NLS.bind(Msg.FILTER_MISSING_RIGHTPAREN, filterstring.substring(pos)), filterstring);
    }
    pos += 1;
    
    skipWhiteSpace();
    
    return filter;
  }
  
  private FilterImpl parse_filtercomp()
    throws InvalidSyntaxException
  {
    skipWhiteSpace();
    
    char c = filterChars[pos];
    switch (c)
    {
    case '&': 
      pos += 1;
      return parse_and();
    case '|': 
      pos += 1;
      return parse_or();
    case '!': 
      pos += 1;
      return parse_not();
    }
    return parse_item();
  }
  
  private FilterImpl parse_and()
    throws InvalidSyntaxException
  {
    int lookahead = pos;
    skipWhiteSpace();
    if (filterChars[pos] != '(')
    {
      pos = (lookahead - 1);
      return parse_item();
    }
    List<FilterImpl> operands = new ArrayList(10);
    while (filterChars[pos] == '(')
    {
      FilterImpl child = parse_filter();
      operands.add(child);
    }
    return new FilterImpl(7, null, operands.toArray(new FilterImpl[operands.size()]));
  }
  
  private FilterImpl parse_or()
    throws InvalidSyntaxException
  {
    int lookahead = pos;
    skipWhiteSpace();
    if (filterChars[pos] != '(')
    {
      pos = (lookahead - 1);
      return parse_item();
    }
    List<FilterImpl> operands = new ArrayList(10);
    while (filterChars[pos] == '(')
    {
      FilterImpl child = parse_filter();
      operands.add(child);
    }
    return new FilterImpl(8, null, operands.toArray(new FilterImpl[operands.size()]));
  }
  
  private FilterImpl parse_not()
    throws InvalidSyntaxException
  {
    int lookahead = pos;
    skipWhiteSpace();
    if (filterChars[pos] != '(')
    {
      pos = (lookahead - 1);
      return parse_item();
    }
    FilterImpl child = parse_filter();
    
    return new FilterImpl(9, null, child);
  }
  
  private FilterImpl parse_item()
    throws InvalidSyntaxException
  {
    String attr = parse_attr();
    
    skipWhiteSpace();
    switch (filterChars[pos])
    {
    case '~': 
      if (filterChars[(pos + 1)] == '=')
      {
        pos += 2;
        return new FilterImpl(2, attr, parse_value());
      }
      break;
    case '>': 
      if (filterChars[(pos + 1)] == '=')
      {
        pos += 2;
        return new FilterImpl(3, attr, parse_value());
      }
      break;
    case '<': 
      if (filterChars[(pos + 1)] == '=')
      {
        pos += 2;
        return new FilterImpl(4, attr, parse_value());
      }
      break;
    case '=': 
      if
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-2017. Infinite Loop Ltd