runtime_registry_compatibility

16:51:54.366 INFO  jd.cli.Main - Decompiling runtime_registry_compatibility.jar
package org.eclipse.core.internal.registry;

import org.eclipse.core.internal.registry.osgi.Activator;
import org.osgi.framework.Bundle;
import org.osgi.service.packageadmin.PackageAdmin;
import org.osgi.util.tracker.ServiceTracker;

public class BundleHelper
{
  private ServiceTracker bundleTracker = null;
  private static final BundleHelper singleton = new BundleHelper();
  
  public static BundleHelper getDefault()
  {
    return singleton;
  }
  
  private PackageAdmin getPackageAdmin()
  {
    if (bundleTracker == null)
    {
      bundleTracker = new ServiceTracker(Activator.getContext(), PackageAdmin.class.getName(), null);
      bundleTracker.open();
    }
    return (PackageAdmin)bundleTracker.getService();
  }
  
  public Bundle getBundle(String symbolicName)
  {
    PackageAdmin packageAdmin = getPackageAdmin();
    if (packageAdmin == null) {
      return null;
    }
    Bundle[] bundles = packageAdmin.getBundles(symbolicName, null);
    if (bundles == null) {
      return null;
    }
    for (int i = 0; i < bundles.length; i++) {
      if ((bundles[i].getState() & 0x3) == 0) {
        return bundles[i];
      }
    }
    return null;
  }
  
  public Bundle[] getHosts(Bundle bundle)
  {
    PackageAdmin packageAdmin = getPackageAdmin();
    if (packageAdmin == null) {
      return null;
    }
    return packageAdmin.getHosts(bundle);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.core.internal.registry.BundleHelper
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.core.internal.registry;

import org.eclipse.core.runtime.IContributor;
import org.eclipse.core.runtime.IPluginDescriptor;
import org.eclipse.core.runtime.InvalidRegistryObjectException;
import org.osgi.framework.Bundle;

/**
 * @deprecated
 */
public class ExtensionHandle
  extends BaseExtensionHandle
{
  static final ExtensionHandle[] EMPTY_ARRAY = new ExtensionHandle[0];
  
  public ExtensionHandle(IObjectManager objectManager, int id)
  {
    super(objectManager, id);
  }
  
  public IPluginDescriptor getDeclaringPluginDescriptor()
    throws InvalidRegistryObjectException
  {
    String namespace = getContributor().getName();
    IPluginDescriptor result = RegistryCompatibilityHelper.getPluginDescriptor(namespace);
    if (result == null)
    {
      Bundle underlyingBundle = BundleHelper.getDefault().getBundle(namespace);
      if (underlyingBundle != null)
      {
        Bundle[] hosts = BundleHelper.getDefault().getHosts(underlyingBundle);
        if (hosts != null) {
          result = RegistryCompatibilityHelper.getPluginDescriptor(hosts[0].getSymbolicName());
        }
      }
    }
    return result;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.core.internal.registry.ExtensionHandle
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.core.internal.registry;

import org.eclipse.core.runtime.IContributor;
import org.eclipse.core.runtime.IPluginDescriptor;

/**
 * @deprecated
 */
public class ExtensionPointHandle
  extends BaseExtensionPointHandle
{
  static final ExtensionPointHandle[] EMPTY_ARRAY = new ExtensionPointHandle[0];
  
  public ExtensionPointHandle(IObjectManager objectManager, int id)
  {
    super(objectManager, id);
  }
  
  public IPluginDescriptor getDeclaringPluginDescriptor()
  {
    return RegistryCompatibilityHelper.getPluginDescriptor(getContributor().getName());
  }
}

/* Location:
 * Qualified Name:     org.eclipse.core.internal.registry.ExtensionPointHandle
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.core.internal.registry;

import java.lang.reflect.Method;
import org.eclipse.core.runtime.IPluginDescriptor;
import org.osgi.framework.Bundle;

/**
 * @deprecated
 */
public class RegistryCompatibilityHelper
{
  public static final String PI_RUNTIME_COMPATIBILITY = "org.eclipse.core.runtime.compatibility";
  private static Bundle compatibility = null;
  
  public static synchronized Bundle initializeCompatibility()
  {
    if ((compatibility == null) || ((compatibility.getState() & 0x13) != 0)) {
      compatibility = BundleHelper.getDefault().getBundle("org.eclipse.core.runtime.compatibility");
    }
    return compatibility;
  }
  
  public static synchronized IPluginDescriptor getPluginDescriptor(String pluginId)
  {
    initializeCompatibility();
    if (compatibility == null) {
      throw new IllegalStateException();
    }
    Class oldInternalPlatform = null;
    try
    {
      oldInternalPlatform = compatibility.loadClass("org.eclipse.core.internal.plugins.InternalPlatform");
      Method getPluginDescriptor = oldInternalPlatform.getMethod("getPluginDescriptor", new Class[] { String.class });
      return (IPluginDescriptor)getPluginDescriptor.invoke(oldInternalPlatform, new Object[] { pluginId });
    }
    catch (Exception localException) {}
    return null;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.core.internal.registry.RegistryCompatibilityHelper
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.core.runtime;

public abstract interface IExtension
{
  public abstract IConfigurationElement[] getConfigurationElements()
    throws InvalidRegistryObjectException;
  
  /**
   * @deprecated
   */
  public abstract String getNamespace()
    throws InvalidRegistryObjectException;
  
  public abstract String getNamespaceIdentifier()
    throws InvalidRegistryObjectException;
  
  public abstract IContributor getContributor()
    throws InvalidRegistryObjectException;
  
  public abstract String getExtensionPointUniqueIdentifier()
    throws InvalidRegistryObjectException;
  
  public abstract String getLabel()
    throws InvalidRegistryObjectException;
  
  public abstract String getLabel(String paramString)
    throws InvalidRegistryObjectException;
  
  public abstract String getSimpleIdentifier()
    throws InvalidRegistryObjectException;
  
  public abstract String getUniqueIdentifier()
    throws InvalidRegistryObjectException;
  
  public abstract boolean equals(Object paramObject);
  
  public abstract boolean isValid();
  
  /**
   * @deprecated
   */
  public abstract IPluginDescriptor getDeclaringPluginDescriptor()
    throws InvalidRegistryObjectException;
}

/* Location:
 * Qualified Name:     org.eclipse.core.runtime.IExtension
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.core.runtime;

public abstract interface IExtensionPoint
{
  public abstract IConfigurationElement[] getConfigurationElements()
    throws InvalidRegistryObjectException;
  
  /**
   * @deprecated
   */
  public abstract String getNamespace()
    throws InvalidRegistryObjectException;
  
  public abstract String getNamespaceIdentifier()
    throws InvalidRegistryObjectException;
  
  public abstract IContributor getContributor()
    throws InvalidRegistryObjectException;
  
  public abstract IExtension getExtension(String paramString)
    throws InvalidRegistryObjectException;
  
  public abstract IExtension[] getExtensions()
    throws InvalidRegistryObjectException;
  
  public abstract String getLabel()
    throws InvalidRegistryObjectException;
  
  public abstract String getLabel(String paramString)
    throws InvalidRegistryObjectException;
  
  public abstract String getSchemaReference()
    throws InvalidRegistryObjectException;
  
  public abstract String getSimpleIdentifier()
    throws InvalidRegistryObjectException;
  
  public abstract String getUniqueIdentifier()
    throws InvalidRegistryObjectException;
  
  public abstract boolean equals(Object paramObject);
  
  public abstract boolean isValid();
  
  /**
   * @deprecated
   */
  public abstract IPluginDescriptor getDeclaringPluginDescriptor()
    throws InvalidRegistryObjectException;
}

/* Location:
 * Qualified Name:     org.eclipse.core.runtime.IExtensionPoint
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.core.runtime;

import java.net.URL;
import java.util.Map;
import java.util.MissingResourceException;
import java.util.ResourceBundle;

/**
 * @deprecated
 */
public abstract interface IPluginDescriptor
{
  /**
   * @deprecated
   */
  public abstract IExtension getExtension(String paramString);
  
  /**
   * @deprecated
   */
  public abstract IExtensionPoint getExtensionPoint(String paramString);
  
  /**
   * @deprecated
   */
  public abstract IExtensionPoint[] getExtensionPoints();
  
  /**
   * @deprecated
   */
  public abstract IExtension[] getExtensions();
  
  /**
   * @deprecated
   */
  public abstract URL getInstallURL();
  
  /**
   * @deprecated
   */
  public abstract String getLabel();
  
  /**
   * @deprecated
   */
  public abstract Plugin getPlugin()
    throws CoreException;
  
  /**
   * @deprecated
   */
  public abstract ClassLoader getPluginClassLoader();
  
  /**
   * @deprecated
   */
  public abstract IPluginPrerequisite[] getPluginPrerequisites();
  
  /**
   * @deprecated
   */
  public abstract String getProviderName();
  
  /**
   * @deprecated
   */
  public abstract ResourceBundle getResourceBundle()
    throws MissingResourceException;
  
  /**
   * @deprecated
   */
  public abstract String getResourceString(String paramString);
  
  /**
   * @deprecated
   */
  public abstract String getResourceString(String paramString, ResourceBundle paramResourceBundle);
  
  /**
   * @deprecated
   */
  public abstract ILibrary[] getRuntimeLibraries();
  
  /**
   * @deprecated
   */
  public abstract String getUniqueIdentifier();
  
  /**
   * @deprecated
   */
  public abstract PluginVersionIdentifier getVersionIdentifier();
  
  /**
   * @deprecated
   */
  public abstract boolean isPluginActivated();
  
  /**
   * @deprecated
   */
  public abstract URL find(IPath paramIPath);
  
  /**
   * @deprecated
   */
  public abstract URL find(IPath paramIPath, Map paramMap);
}

/* Location:
 * Qualified Name:     org.eclipse.core.runtime.IPluginDescriptor
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
1

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