org.eclipse.osgi_3.8.2.v20130124-134944

g;

import java.util.Collection;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
import org.osgi.framework.FrameworkListener;

public abstract interface FrameworkWiring
  extends BundleReference
{
  public abstract void refreshBundles(Collection<Bundle> paramCollection, FrameworkListener[] paramArrayOfFrameworkListener);
  
  public abstract boolean resolveBundles(Collection<Bundle> paramCollection);
  
  public abstract Collection<Bundle> getRemovalPendingBundles();
  
  public abstract Collection<Bundle> getDependencyClosure(Collection<Bundle> paramCollection);
}

/* Location:
 * Qualified Name:     org.osgi.framework.wiring.FrameworkWiring
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.resource;

import java.util.Map;

public abstract interface Capability
{
  public abstract String getNamespace();
  
  public abstract Map<String, String> getDirectives();
  
  public abstract Map<String, Object> getAttributes();
  
  public abstract Resource getResource();
  
  public abstract boolean equals(Object paramObject);
  
  public abstract int hashCode();
}

/* Location:
 * Qualified Name:     org.osgi.resource.Capability
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.resource;

public abstract class Namespace
{
  public static final String CAPABILITY_USES_DIRECTIVE = "uses";
  public static final String CAPABILITY_EFFECTIVE_DIRECTIVE = "effective";
  public static final String REQUIREMENT_FILTER_DIRECTIVE = "filter";
  public static final String REQUIREMENT_RESOLUTION_DIRECTIVE = "resolution";
  public static final String RESOLUTION_MANDATORY = "mandatory";
  public static final String RESOLUTION_OPTIONAL = "optional";
  public static final String REQUIREMENT_EFFECTIVE_DIRECTIVE = "effective";
  public static final String EFFECTIVE_RESOLVE = "resolve";
  public static final String EFFECTIVE_ACTIVE = "active";
  public static final String REQUIREMENT_CARDINALITY_DIRECTIVE = "cardinality";
  public static final String CARDINALITY_MULTIPLE = "multiple";
  public static final String CARDINALITY_SINGLE = "single";
}

/* Location:
 * Qualified Name:     org.osgi.resource.Namespace
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.resource;

import java.util.Map;

public abstract interface Requirement
{
  public abstract String getNamespace();
  
  public abstract Map<String, String> getDirectives();
  
  public abstract Map<String, Object> getAttributes();
  
  public abstract Resource getResource();
  
  public abstract boolean equals(Object paramObject);
  
  public abstract int hashCode();
}

/* Location:
 * Qualified Name:     org.osgi.resource.Requirement
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.resource;

import java.util.List;

public abstract interface Resource
{
  public abstract List<Capability> getCapabilities(String paramString);
  
  public abstract List<Requirement> getRequirements(String paramString);
  
  public abstract boolean equals(Object paramObject);
  
  public abstract int hashCode();
}

/* Location:
 * Qualified Name:     org.osgi.resource.Resource
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.resource;

public abstract interface Wire
{
  public abstract Capability getCapability();
  
  public abstract Requirement getRequirement();
  
  public abstract Resource getProvider();
  
  public abstract Resource getRequirer();
  
  public abstract boolean equals(Object paramObject);
  
  public abstract int hashCode();
}

/* Location:
 * Qualified Name:     org.osgi.resource.Wire
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.resource;

import java.util.List;

public abstract interface Wiring
{
  public abstract List<Capability> getResourceCapabilities(String paramString);
  
  public abstract List<Requirement> getResourceRequirements(String paramString);
  
  public abstract List<Wire> getProvidedResourceWires(String paramString);
  
  public abstract List<Wire> getRequiredResourceWires(String paramString);
  
  public abstract Resource getResource();
}

/* Location:
 * Qualified Name:     org.osgi.resource.Wiring
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.condpermadmin;

import java.util.Dictionary;

final class BooleanCondition
  implements Condition
{
  private final boolean satisfied;
  
  BooleanCondition(boolean satisfied)
  {
    this.satisfied = satisfied;
  }
  
  public boolean isPostponed()
  {
    return false;
  }
  
  public boolean isSatisfied()
  {
    return satisfied;
  }
  
  public boolean isMutable()
  {
    return false;
  }
  
  public boolean isSatisfied(Condition[] conds, Dictionary<Object, Object> context)
  {
    int i = 0;
    for (int length = conds.length; i < length; i++) {
      if (!conds[i].isSatisfied()) {
        return false;
      }
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.condpermadmin.BooleanCondition
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.condpermadmin;

import java.security.PrivilegedAction;
import org.osgi.framework.Bundle;

class BundleLocationCondition$1
  implements PrivilegedAction<String>
{
  private final Bundle val$bundle;
  
  BundleLocationCondition$1(Bundle paramBundle) {}
  
  public String run()
  {
    return val$bundle.getLocation();
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.condpermadmin.BundleLocationCondition.1
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.condpermadmin;

import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.Dictionary;
import java.util.Hashtable;
import org.osgi.framework.Bundle;
import org.osgi.framework.Filter;
import org.osgi.framework.FrameworkUtil;
import org.osgi.framework.InvalidSyntaxException;

public class BundleLocationCondition
{
  private static final String CONDITION_TYPE = "org.osgi.service.condpermadmin.BundleLocationCondition";
  
  public static Condition getCondition(Bundle bundle, ConditionInfo info)
  {
    if (!"org.osgi.service.condpermadmin.BundleLocationCondition".equals(info.getType())) {
      throw new IllegalArgumentException("ConditionInfo must be of type \"org.osgi.service.condpermadmin.BundleLocationCondition\"");
    }
    String[] args = info.getArgs();
    if ((args.length != 1) && (args.length != 2)) {
      throw new IllegalArgumentException("Illegal number of args: " + args.length);
    }
    String bundleLocation = (String)AccessController.doPrivileged(new PrivilegedAction()
    {
      public String run()
      {
        return getLocation();
      }
    });
    Filter filter = null;
    try
    {
      filter = FrameworkUtil.createFilter("(location=" + escapeLocation(args[0]) + ")");
    }
    catch (InvalidSyntaxException e)
    {
      throw new RuntimeException("Invalid filter: " + e.getFilter(), e);
    }
    Dictionary<String, String> matchProps = new Hashtable(2);
    matchProps.put("location", bundleLocation);
    boolean negate = args.length == 2 ? "!".equals(args[1]) : false;
    return (negate ^ filter.match(matchProps)) ? Condition.TRUE : Condition.FALSE;
  }
  
  private static String escapeLocation(String value)
  {
    boolean escaped = false;
    int inlen = value.length();
    int outlen = inlen << 1;
    
    char[] output = new char[outlen];
    value.getChars(0, inlen, output, inlen);
    
    int cursor = 0;
    for (int i = inlen; i < outlen; i++)
    {
      char c = output[i];
      switch (c)
      {
      case '\\': 
        if ((i + 1 < outlen) && (output[(i + 1)] == '*')) {
          break;
        }
      case '(': 
      case ')': 
        output[cursor] = '\\';
        cursor++;
        escaped = true;
      }
      output[cursor] = c;
      cursor++;
    }
    return escaped ? new String(output, 0, cursor) : value;
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.condpermadmin.BundleLocationCondition
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.condpermadmin;

import java.security.Principal;
import java.security.cert.X509Certificate;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import org.osgi.framework.Bundle;
import org.osgi.framework.FrameworkUtil;

public class BundleSignerCondition
{
  private static final String CONDITION_TYPE = "org.osgi.service.condpermadmin.BundleSignerCondition";
  
  public static Condition getCondition(Bundle bundle, ConditionInfo info)
  {
    if (!"org.osgi.service.condpermadmin.BundleSignerCondition".equals(info.getType())) {
      throw new IllegalArgumentException("ConditionInfo must be of type \"org.osgi.service.condpermadmin.BundleSignerCondition\"");
    }
    String[] args = info.getArgs();
    if ((args.length != 1) && (args.length != 2)) {
      throw new IllegalArgumentException("Illegal number of args: " + args.length);
    }
    Map<X509Certificate, List<X509Certificate>> signers = bundle.getSignerCertificates(2);
    boolean match = false;
    for (Iterator localIterator1 = signers.values().iterator(); localIterator1.hasNext();)
    {
      List<X509Certificate> signerCerts = (List)localIterator1.next();
      List<String> dnChain = new ArrayList(signerCerts.size());
      for (Iterator localIterator2 = signerCerts.iterator(); localIterator2.hasNext();)
      {
        X509Certificate signer = (X509Certificate)localIterator2.next();
        dnChain.add(signer.getSubjectDN().getName());
      }
      if (FrameworkUtil.matchDistinguishedNameChain(args[0], dnChain))
      {
        match = true;
        break;
      }
    }
    boolean negate = args.length == 2 ? "!".equals(args[1]) : false;
    return (negate ^ match) ? Condition.TRUE : Condition.FALSE;
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.condpermadmin.BundleSignerCondition
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.condpermadmin;

import java.util.Dictionary;

public abstract interface Condition
{
  public static final Condition TRUE = new BooleanCondition(true);
  public static final Condition FALSE = new BooleanCondition(false);
  
  public abstract boolean isPostponed();
  
  public abstract boolean isSatisfied();
  
  public abstract boolean isMutable();
  
  public abstract boolean isSatisfied(Condition[] paramArrayOfCondition, Dictionary<Object, Object> paramDictionary);
}

/* Location:
 * Qualified Name:     org.osgi.service.condpermadmin.Condition
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.condpermadmin;

import java.util.ArrayList;
import java.util.List;

public class ConditionInfo
{
  private final String type;
  private final String[] args;
  
  public ConditionInfo(String type, String[] args)
  {
    this.type = type;
    this.args = (args != null ? (String[])args.clone() : new String[0]);
    if (type == null) {
      throw new NullPointerException("type is null");
    }
  }
  
  public ConditionInfo(String encodedCondition)
  {
    if (encodedCondition == null) {
      throw new NullPointerException("missing encoded condition");
    }
    if (encodedCondition.length() == 0) {
      throw new IllegalArgumentException("empty encoded condition");
    }
    try
    {
      char[] encoded = encodedCondition.toCharArray();
      int length = encoded.length;
      int pos = 0;
      while (Character.isWhitespace(encoded[pos])) {
        pos++;
      }
      if (encoded[pos] != '[') {
        throw new IllegalArgumentException("expecting open bracket");
      }
      pos++;
      while (Character.isWhitespace(encoded[pos])) {
        pos++;
      }
      int begin = pos;
      while ((!Character.isWhitespace(encoded[pos])) && (encoded[pos] != ']')) {
        pos++;
      }
      if ((pos == begin) || (encoded[begin] == '"')) {
        throw new IllegalArgumentException("expecting type");
      }
      type = new String(encoded, begin, pos - begin);
      while (Character.isWhitespace(encoded[pos])) {
        pos++;
      }
      List<String> argsList = new ArrayList();
      while (encoded[pos] == '"')
      {
        pos++;
        begin = pos;
        while (encoded[pos] != '"')
        {
          if (encoded[pos] == '\\') {
            pos++;
          }
          pos++;
        }
        argsList.add(unescapeString(encoded, begin, pos));
        pos++;
        if (Character.isWhitespace(encoded[pos])) {
          while (Character.isWhitespace(encoded[pos])) {
            pos++;
          }
        }
      }
      args = ((String[])argsList.toArray(new String[argsList.size()]));
      
      char c = encoded[pos];
      pos++;
      while ((pos < length) && (Character.isWhitespace(encoded[pos]))) {
        pos++;
      }
      if ((c != ']') || (pos != length)) {
        throw new IllegalArgumentException("expecting close bracket");
      }
    }
    catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException)
    {
      throw new IllegalArgumentException("parsing terminated abruptly");
    }
  }
  
  public final String getEncoded()
  {
    StringBuffer output = new StringBuffer();
    output.append('[');
    output.append(type);
    for (int i = 0; i < args.length; i++)
    {
      output.append(" \"");
      escapeString(args[i], output);
      output.append('"');
    }
    output.append(']');
    
    return output.toString();
  }
  
  public String toString()
  {
    return getEncoded();
  }
  
  public final String getType()
  {
    return type;
  }
  
  public final String[] getArgs()
  {
    return (String[])args.clone();
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof ConditionInfo)) {
      return false;
    }
    ConditionInfo other = (ConditionInfo)obj;
    if ((!type.equals(type)) || (args.length != args.length)) {
      return false;
    }
    for (int i = 0; i < args.length; i++) {
      if (!args[i].equals(args[i])) {
        return false;
      }
    }
    return true;
  }
  
  public int hashCode()
  {
    int h = 527 + type.hashCode();
    for (int i = 0; i < args.length; i++) {
      h = 31 * h + args[i].hashCode();
    }
    return h;
  }
  
  private static void escapeString(String str, StringBuffer output)
  {
    int len = str.length();
    for (int i = 0; i < len; i++)
    {
      char c = str.charAt(i);
      switch (c)
      {
      case '"': 
      case '\\': 
        output.append('\\');
        output.append(c);
        break;
      case '\r': 
        output.append("\\r");
        break;
      case '\n': 
        output.append("\\n");
        break;
      default: 
        output.append(c);
      }
    }
  }
  
  private static String unescapeString(char[] str, int begin, int end)
  {
    StringBuffer output = new StringBuffer(end - begin);
    for (int i = begin; i < end; i++)
    {
      char c = str[i];
      if (c == '\\')
      {
        i++;
        if (i < end)
        {
          c = str[i];
          switch (c)
          {
          case '"': 
          case '\\': 
            break;
          case 'r': 
            c = '\r';
            break;
          case 'n': 
            c = '\n';
            break;
          default: 
            c = '\\';
            i--;
          }
        }
      }
      output.append(c);
    }
    return output.toString();
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.condpermadmin.ConditionInfo
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.condpermadmin;

import java.security.AccessControlContext;
import java.util.Enumeration;
import org.osgi.service.permissionadmin.PermissionInfo;

public abstract interface ConditionalPermissionAdmin
{
  /**
   * @deprecated
   */
  public abstract ConditionalPermissionInfo addConditionalPermissionInfo(ConditionInfo[] paramArrayOfConditionInfo, PermissionInfo[] paramArrayOfPermissionInfo);
  
  /**
   * @deprecated
   */
  public abstract ConditionalPermissionInfo setConditionalPermissionInfo(String paramString, ConditionInfo[] paramArrayOfConditionInfo, PermissionInfo[] paramArrayOfPermissionInfo);
  
  /**
   * @deprecated
   */
  public abstract Enumeration<ConditionalPermissionInfo> getConditionalPermissionInfos();
  
  /**
   * @deprecated
   */
  public abstract ConditionalPermissionInfo getConditionalPermissionInfo(String paramString);
  
  public abstract AccessControlContext getAccessControlContext(String[] paramArrayOfString);
  
  public abstract ConditionalPermissionUpdate newConditionalPermissionUpdate();
  
  public abstract ConditionalPermissionInfo newConditionalPermissionInfo(String paramString1, ConditionInfo[] paramArrayOfConditionInfo, PermissionInfo[] paramArrayOfPermissionInfo, String paramString2);
  
  public abstract ConditionalPermissionInfo newConditionalPermissionInfo(String paramString);
}

/* Location:
 * Qualified Name:     org.osgi.service.condpermadmin.ConditionalPermissionAdmin
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.condpermadmin;

import org.osgi.service.permissionadmin.PermissionInfo;

public abstract interface ConditionalPermissionInfo
{
  public static final String ALLOW = "allow";
  public static final String DENY = "deny";
  
  public abstract ConditionInfo[] getConditionInfos();
  
  public abstract PermissionInfo[] getPermissionInfos();
  
  /**
   * @deprecated
   */
  public abstract void delete();
  
  public abstract String getName();
  
  public abstract String getAccessDecision();
  
  public abstract String getEncoded();
  
  public abstract String toString();
  
  public abstract boolean equals(Object paramObject);
  
  public abstract int hashCode();
}

/* Location:
 * Qualified Name:     org.osgi.service.condpermadmin.ConditionalPermissionInfo
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.condpermadmin;

import java.util.List;

public abstract interface ConditionalPermissionUpdate
{
  public abstract List<ConditionalPermissionInfo> getConditionalPermissionInfos();
  
  public abstract boolean commit();
}

/* Location:
 * Qualified Name:     org.osgi.service.condpermadmin.ConditionalPermissionUpdate
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.framework;

import java.io.InputStream;
import java.util.Map;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
import org.osgi.framework.launch.Framework;

/**
 * @deprecated
 */
public abstract interface CompositeBundle
  extends Bundle
{
  public abstract Framework getCompositeFramework();
  
  public abstract SurrogateBundle getSurrogateBundle();
  
  public abstract void update(Map paramMap)
    throws BundleException;
  
  public abstract void update()
    throws BundleException;
  
  public abstract void update(InputStream paramInputStream)
    throws BundleException;
  
  public abstract void uninstall()
    throws BundleException;
}

/* Location:
 * Qualified Name:     org.osgi.service.framework.CompositeBundle
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.framework;

import java.util.Map;
import org.osgi.framework.BundleException;

/**
 * @deprecated
 */
public abstract interface CompositeBundleFactory
{
  public static final String COMPOSITE_SERVICE_FILTER_IMPORT = "CompositeServiceFilter-Import";
  public static final String COMPOSITE_SERVICE_FILTER_EXPORT = "CompositeServiceFilter-Export";
  
  public abstract CompositeBundle installCompositeBundle(Map paramMap1, String paramString, Map paramMap2)
    throws BundleException;
}

/* Location:
 * Qualified Name:     org.osgi.service.framework.CompositeBundleFactory
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.framework;

import java.io.InputStream;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleException;

/**
 * @deprecated
 */
public abstract interface SurrogateBundle
  extends Bundle
{
  public abstract BundleContext getCompositeBundleContext();
  
  public abstract void update()
    throws BundleException;
  
  public abstract void update(InputStream paramInputStream)
    throws BundleException;
  
  public abstract void uninstall()
    throws BundleException;
}

/* Location:
 * Qualified Name:     org.osgi.service.framework.SurrogateBundle
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import org.osgi.framework.Bundle;
import org.osgi.framework.ServiceReference;

public abstract interface LogEntry
{
  public abstract Bundle getBundle();
  
  public abstract ServiceReference getServiceReference();
  
  public abstract int getLevel();
  
  public abstract String getMessage();
  
  public abstract Throwable getException();
  
  public abstract long getTime();
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogEntry
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import java.util.EventListener;

public abstract interface LogListener
  extends EventListener
{
  public abstract void logged(LogEntry paramLogEntry);
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogListener
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import java.util.Enumeration;

public abstract interface LogReaderService
{
  public abstract void addLogListener(LogListener paramLogListener);
  
  public abstract void removeLogListener(LogListener paramLogListener);
  
  public abstract Enumeration getLog();
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogReaderService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

import org.osgi.framework.ServiceReference;

public abstract interface LogService
{
  public static final int LOG_ERROR = 1;
  public static final int LOG_WARNING = 2;
  public static final int LOG_INFO = 3;
  public static final int LOG_DEBUG = 4;
  
  public abstract void log(int paramInt, String paramString);
  
  public abstract void log(int paramInt, String paramString, Throwable paramThrowable);
  
  public abstract void log(ServiceReference paramServiceReference, int paramInt, String paramString);
  
  public abstract void log(ServiceReference paramServiceReference, int paramInt, String paramString, Throwable paramThrowable);
}

/* Location:
 * Qualified Name:     org.osgi.service.log.LogService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.log;

abstract interface package-info {}

/* Location:
 * Qualified Name:     org.osgi.service.log.package-info
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.packageadmin;

import org.osgi.framework.Bundle;
import org.osgi.framework.Version;

/**
 * @deprecated
 */
public abstract interface ExportedPackage
{
  public abstract String getName();
  
  public abstract Bundle getExportingBundle();
  
  public abstract Bundle[] getImportingBundles();
  
  /**
   * @deprecated
   */
  public abstract String getSpecificationVersion();
  
  public abstract Version getVersion();
  
  public abstract boolean isRemovalPending();
}

/* Location:
 * Qualified Name:     org.osgi.service.packageadmin.ExportedPackage
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.packageadmin;

import org.osgi.framework.Bundle;

/**
 * @deprecated
 */
public abstract interface PackageAdmin
{
  public static final int BUNDLE_TYPE_FRAGMENT = 1;
  
  public abstract ExportedPackage[] getExportedPackages(Bundle paramBundle);
  
  public abstract ExportedPackage[] getExportedPackages(String paramString);
  
  public abstract ExportedPackage getExportedPackage(String paramString);
  
  public abstract void refreshPackages(Bundle[] paramArrayOfBundle);
  
  public abstract boolean resolveBundles(Bundle[] paramArrayOfBundle);
  
  public abstract RequiredBundle[] getRequiredBundles(String paramString);
  
  public abstract Bundle[] getBundles(String paramString1, String paramString2);
  
  public abstract Bundle[] getFragments(Bundle paramBundle);
  
  public abstract Bundle[] getHosts(Bundle paramBundle);
  
  public abstract Bundle getBundle(Class paramClass);
  
  public abstract int getBundleType(Bundle paramBundle);
}

/* Location:
 * Qualified Name:     org.osgi.service.packageadmin.PackageAdmin
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.packageadmin;

import org.osgi.framework.Bundle;
import org.osgi.framework.Version;

/**
 * @deprecated
 */
public abstract interface RequiredBundle
{
  public abstract String getSymbolicName();
  
  public abstract Bundle getBundle();
  
  public abstract Bundle[] getRequiringBundles();
  
  public abstract Version getVersion();
  
  public abstract boolean isRemovalPending();
}

/* Location:
 * Qualified Name:     org.osgi.service.packageadmin.RequiredBundle
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.permissionadmin;

public abstract interface PermissionAdmin
{
  public abstract PermissionInfo[] getPermissions(String paramString);
  
  public abstract void setPermissions(String paramString, PermissionInfo[] paramArrayOfPermissionInfo);
  
  public abstract String[] getLocations();
  
  public abstract PermissionInfo[] getDefaultPermissions();
  
  public abstract void setDefaultPermissions(PermissionInfo[] paramArrayOfPermissionInfo);
}

/* Location:
 * Qualified Name:     org.osgi.service.permissionadmin.PermissionAdmin
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.permissionadmin;

public class PermissionInfo
{
  private final String type;
  private final String name;
  private final String actions;
  
  public PermissionInfo(String type, String name, String actions)
  {
    this.type = type;
    this.name = name;
    this.actions = actions;
    if (type == null) {
      throw new NullPointerException("type is null");
    }
    if ((name == null) && (actions != null)) {
      throw new IllegalArgumentException("name missing");
    }
  }
  
  public PermissionInfo(String encodedPermission)
  {
    if (encodedPermission == null) {
      throw new NullPointerException("missing encoded permission");
    }
    if (encodedPermission.length() == 0) {
      throw new IllegalArgumentException("empty encoded permission");
    }
    String parsedType = null;
    String parsedName = null;
    String parsedActions = null;
    try
    {
      char[] encoded = encodedPermission.toCharArray();
      int length = encoded.length;
      int pos = 0;
      while (Character.isWhitespace(encoded[pos])) {
        pos++;
      }
      if (encoded[pos] != '(') {
        throw new IllegalArgumentException("expecting open parenthesis");
      }
      pos++;
      while (Character.isWhitespace(encoded[pos])) {
        pos++;
      }
      int begin = pos;
      while ((!Character.isWhitespace(encoded[pos])) && (encoded[pos] != ')')) {
        pos++;
      }
      if ((pos == begin) || (encoded[begin] == '"')) {
        throw new IllegalArgumentException("expecting type");
      }
      parsedType = new String(encoded, begin, pos - begin);
      while (Character.isWhitespace(encoded[pos])) {
        pos++;
      }
      if (encoded[pos] == '"')
      {
        pos++;
        begin = pos;
        while (encoded[pos] != '"')
        {
          if (encoded[pos] == '\\') {
            pos++;
          }
          pos++;
        }
        parsedName = unescapeString(encoded, begin, pos);
        pos++;
        if (Character.isWhitespace(encoded[pos]))
        {
          while (Character.isWhitespace(encoded[pos])) {
            pos++;
          }
          if (encoded[pos] == '"')
          {
            pos++;
            begin = pos;
            while (encoded[pos] != '"')
            {
              if (encoded[pos] == '\\') {
                pos++;
              }
              pos++;
            }
            parsedActions = unescapeString(encoded, begin, pos);
            pos++;
            while (Character.isWhitespace(encoded[pos])) {
              pos++;
            }
          }
        }
      }
      char c = encoded[pos];
      pos++;
      while ((pos < length) && (Character.isWhitespace(encoded[pos]))) {
        pos++;
      }
      if ((c != ')') || (pos != length)) {
        throw new IllegalArgumentException("expecting close parenthesis");
      }
    }
    catch (ArrayIndexOutOfBoundsException localArrayIndexOutOfBoundsException)
    {
      throw new IllegalArgumentException("parsing terminated abruptly");
    }
    type = parsedType;
    name = parsedName;
    actions = parsedActions;
  }
  
  public final String getEncoded()
  {
    StringBuffer output = new StringBuffer(8 + type.length() + ((name == null ? 0 : name.length()) + (actions == null ? 0 : actions.length()) << 1));
    output.append('(');
    output.append(type);
    if (name != null)
    {
      output.append(" \"");
      escapeString(name, output);
      if (actions != null)
      {
        output.append("\" \"");
        escapeString(actions, output);
      }
      output.append('"');
    }
    output.append(')');
    return output.toString();
  }
  
  public String toString()
  {
    return getEncoded();
  }
  
  public final String getType()
  {
    return type;
  }
  
  public final String getName()
  {
    return name;
  }
  
  public final String getActions()
  {
    return actions;
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof PermissionInfo)) {
      return false;
    }
    PermissionInfo other = (PermissionInfo)obj;
    if (type.equals(type)) {
      if (((name == null ? 1 : 0) ^ (name == null ? 1 : 0)) == 0) {
        if (((actions == null ? 1 : 0) ^ (actions == null ? 1 : 0)) == 0) {
          break label93;
        }
      }
    }
    return false;
    label93:
    if (name != null)
    {
      if (actions != null) {
        return (name.equals(name)) && (actions.equals(actions));
      }
      return name.equals(name);
    }
    return true;
  }
  
  public int hashCode()
  {
    int h = 527 + type.hashCode();
    if (name != null)
    {
      h = 31 * h + name.hashCode();
      if (actions != null) {
        h = 31 * h + actions.hashCode();
      }
    }
    return h;
  }
  
  private static void escapeString(String str, StringBuffer output)
  {
    int len = str.length();
    for (int i = 0; i < len; i++)
    {
      char c = str.charAt(i);
      switch (c)
      {
      case '"': 
      case '\\': 
        output.append('\\');
        output.append(c);
        break;
      case '\r': 
        output.append("\\r");
        break;
      case '\n': 
        output.append("\\n");
        break;
      default: 
        output.append(c);
      }
    }
  }
  
  private static String unescapeString(char[] str, int begin, int end)
  {
    StringBuffer output = new StringBuffer(end - begin);
    for (int i = begin; i < end; i++)
    {
      char c = str[i];
      if (c == '\\')
      {
        i++;
        if (i < end)
        {
          c = str[i];
          switch (c)
          {
          case '"': 
          case '\\': 
            break;
          case 'r': 
            c = '\r';
            break;
          case 'n': 
            c = '\n';
            break;
          default: 
            c = '\\';
            i--;
          }
        }
      }
      output.append(c);
    }
    return output.toString();
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.permissionadmin.PermissionInfo
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.startlevel;

import org.osgi.framework.Bundle;

/**
 * @deprecated
 */
public abstract interface StartLevel
{
  public abstract int getStartLevel();
  
  public abstract void setStartLevel(int paramInt);
  
  public abstract int getBundleStartLevel(Bundle paramBundle);
  
  public abstract void setBundleStartLevel(Bundle paramBundle, int paramInt);
  
  public abstract int getInitialBundleStartLevel();
  
  public abstract void setInitialBundleStartLevel(int paramInt);
  
  public abstract boolean isBundlePersistentlyStarted(Bundle paramBundle);
  
  public abstract boolean isBundleActivationPolicyUsed(Bundle paramBundle);
}

/* Location:
 * Qualified Name:     org.osgi.service.startlevel.StartLevel
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.url;

import java.io.IOException;
import java.net.InetAddress;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

public abstract class AbstractURLStreamHandlerService
  extends URLStreamHandler
  implements URLStreamHandlerService
{
  protected volatile URLStreamHandlerSetter realHandler;
  
  public abstract URLConnection openConnection(URL paramURL)
    throws IOException;
  
  public void parseURL(URLStreamHandlerSetter realHandler, URL u, String spec, int start, int limit)
  {
    this.realHandler = realHandler;
    parseURL(u, spec, start, limit);
  }
  
  public String toExternalForm(URL u)
  {
    return super.toExternalForm(u);
  }
  
  public boolean equals(URL u1, URL u2)
  {
    return super.equals(u1, u2);
  }
  
  public int getDefaultPort()
  {
    return super.getDefaultPort();
  }
  
  public InetAddress getHostAddress(URL u)
  {
    return super.getHostAddress(u);
  }
  
  public int hashCode(URL u)
  {
    return super.hashCode(u);
  }
  
  public boolean hostsEqual(URL u1, URL u2)
  {
    return super.hostsEqual(u1, u2);
  }
  
  public boolean sameFile(URL u1, URL u2)
  {
    return super.sameFile(u1, u2);
  }
  
  /**
   * @deprecated
   */
  protected void setURL(URL u, String proto, String host, int port, String file, String ref)
  {
    realHandler.setURL(u, proto, host, port, file, ref);
  }
  
  protected void setURL(URL u, String proto, String host, int port, String auth, String user, String path, String query, String ref)
  {
    realHandler.setURL(u, proto, host, port, auth, user, path, query, ref);
  }
}

/* Location:
 * Qualified Name:     org.osgi.service.url.AbstractURLStreamHandlerService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.url;

public abstract interface URLConstants
{
  public static final String URL_HANDLER_PROTOCOL = "url.handler.protocol";
  public static final String URL_CONTENT_MIMETYPE = "url.content.mimetype";
}

/* Location:
 * Qualified Name:     org.osgi.service.url.URLConstants
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.url;

import java.io.IOException;
import java.net.InetAddress;
import java.net.URL;
import java.net.URLConnection;

public abstract interface URLStreamHandlerService
{
  public abstract URLConnection openConnection(URL paramURL)
    throws IOException;
  
  public abstract void parseURL(URLStreamHandlerSetter paramURLStreamHandlerSetter, URL paramURL, String paramString, int paramInt1, int paramInt2);
  
  public abstract String toExternalForm(URL paramURL);
  
  public abstract boolean equals(URL paramURL1, URL paramURL2);
  
  public abstract int getDefaultPort();
  
  public abstract InetAddress getHostAddress(URL paramURL);
  
  public abstract int hashCode(URL paramURL);
  
  public abstract boolean hostsEqual(URL paramURL1, URL paramURL2);
  
  public abstract boolean sameFile(URL paramURL1, URL paramURL2);
}

/* Location:
 * Qualified Name:     org.osgi.service.url.URLStreamHandlerService
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.service.url;

import java.net.URL;

public abstract interface URLStreamHandlerSetter
{
  /**
   * @deprecated
   */
  public abstract void setURL(URL paramURL, String paramString1, String paramString2, int paramInt, String paramString3, String paramString4);
  
  public abstract void setURL(URL paramURL, String paramString1, String paramString2, int paramInt, String paramString3, String paramString4, String paramString5, String paramString6, String paramString7);
}

/* Location:
 * Qualified Name:     org.osgi.service.url.URLStreamHandlerSetter
 * Java Class Version: 1.4 (48.0)
 * JD-Core Version:    0.7.1
 */
package org.osgi.util.tracker;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.LinkedList;
import java.util.List;
import java.util.Map;
import java.util.Set;

abstract class AbstractTracked<S, T, R>
{
  static final boolean DEBUG = false;
  private final Map<S, T> tracked;
  private int trackingCount;
  private final List<S> adding;
  volatile boolean closed;
  private final LinkedList<S> initial;
  
  AbstractTracked()
  {
    tracked = new HashMap();
    trackingCount = 0;
    adding = new ArrayList(6);
    initial = new LinkedList();
    closed = false;
  }
  
  void setInitial(S[] list)
  {
    if (list == null) {
      return;
    }
    Object[] arrayOfObject;
    int j = (arrayOfObject = list).length;
    for (int i = 0; i < j; i++)
    {
      S item = arrayOfObject[i];
      if (item != null) {
        initial.add(item);
      }
    }
  }
  
  void trackInitial()
  {
    for (;;)
    {
      synchronized (this)
      {
        if ((closed) || (initial.size() == 0)) {
          return;
        }
        S item = initial.removeFirst();
        if ((tracked.get(item) != null) || 
        
          (adding.contains(item))) {
          continue;
        }
        adding.add(item);
      }
      S item;
      trackAdding(item, null);
    }
  }
  
  void close()
  {
    closed = true;
  }
  
  void track(S item, R related)
  {
    synchronized (this)
    {
      if (closed) {
        return;
      }
      T object = tracked.get(item);
      if (object == null)
      {
        if (adding.contains(item)) {
          return;
        }
        adding.add(item);
      }
      else
      {
        modified();
      }
    }
    T object;
    if (object == null) {
      trackAdding(item, related);
    } else {
      customizerModified(item, related, object);
    }
  }
  
  /* Error */
  private void trackAdding(S item, R related)
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_3
    //   2: iconst_0
    //   3: istore 4
    //   5: aload_0
    //   6: aload_1
    //   7: aload_2
    //   8: invokevirtual 138	org/osgi/util/tracker/AbstractTracked:customizerAdding	(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;
    //   11: astore_3
    //   12: goto +73 -> 85
    //   15: astore 5
    //   17: aload_0
    //   18: dup
    //   19: astore 6
    //   21: monitorenter
    //   22: aload_0
    //   23: getfield 125	org/osgi/util/tracker/AbstractTracked:adding	Ljava/util/List;
    //   26: aload_1
    //   27: invokeinterface 143 2 0
    //   32: ifeq +37 -> 69
    //   35: aload_0
    //   36: getfield 123	org/osgi/util/tracker/AbstractTracked:closed	Z
    //   39: ifne +30 -> 69
    //   42: aload_3
    //   43: ifnull +29 -> 72
    //   46: aload_0
    //   47: getfield 126	org/osgi/util/tracker/AbstractTracked:tracked	Ljava/util/Map;
    //   50: aload_1
    //   51: aload_3
    //   52: invokeinterface 150 3 0
    //   57: pop
    //   58: aload_0
    //   59: invokevirtual 136	org/osgi/util/tracker/AbstractTracked:modified	()V
    //   62: aload_0
    //   63: invokevirtual 128	java/lang/Object:notifyAll	()V
    //   66: goto +6 -> 72
    //   69: iconst_1
    //   70: istore 4
    //   72: aload 6
    //   74: monitorexit
    //   75: goto +7 -> 82
    //   78: aload 6
    //   80: monitorexit
  
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 85 86 87

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