org.eclipse.osgi_3.7.2.v20120110-1415

lid permission: " + actions);
    }
    return mask;
  }
  
  public boolean implies(Permission p)
  {
    if (!(p instanceof BundlePermission)) {
      return false;
    }
    BundlePermission requested = (BundlePermission)p;
    
    int effective = getActionsMask();
    int desired = requested.getActionsMask();
    
    return ((effective & desired) == desired) && (super.implies(requested));
  }
  
  public String getActions()
  {
    String result = actions;
    if (result == null)
    {
      StringBuffer sb = new StringBuffer();
      boolean comma = false;
      if ((action_mask & 0x1) == 1)
      {
        sb.append("provide");
        comma = true;
      }
      if ((action_mask & 0x2) == 2)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("require");
        comma = true;
      }
      if ((action_mask & 0x4) == 4)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("host");
        comma = true;
      }
      if ((action_mask & 0x8) == 8)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("fragment");
      }
      actions = (result = sb.toString());
    }
    return result;
  }
  
  public PermissionCollection newPermissionCollection()
  {
    return new BundlePermissionCollection();
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof BundlePermission)) {
      return false;
    }
    BundlePermission bp = (BundlePermission)obj;
    
    return (getActionsMask() == bp.getActionsMask()) && (getName().equals(bp.getName()));
  }
  
  public int hashCode()
  {
    int h = 527 + getName().hashCode();
    h = 31 * h + getActions().hashCode();
    return h;
  }
  
  private synchronized void writeObject(ObjectOutputStream s)
    throws IOException
  {
    if (actions == null) {
      getActions();
    }
    s.defaultWriteObject();
  }
  
  private synchronized void readObject(ObjectInputStream s)
    throws IOException, ClassNotFoundException
  {
    s.defaultReadObject();
    setTransients(parseActions(actions));
  }
}

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

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectInputStream.GetField;
import java.io.ObjectOutputStream;
import java.io.ObjectOutputStream.PutField;
import java.io.ObjectStreamField;
import java.security.Permission;
import java.security.PermissionCollection;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.List;
import java.util.Map;

final class BundlePermissionCollection
  extends PermissionCollection
{
  private static final long serialVersionUID = 3258407326846433079L;
  private transient Map<String, BundlePermission> permissions;
  private boolean all_allowed;
  
  public BundlePermissionCollection()
  {
    permissions = new HashMap();
    all_allowed = false;
  }
  
  public void add(Permission permission)
  {
    if (!(permission instanceof BundlePermission)) {
      throw new IllegalArgumentException("invalid permission: " + 
        permission);
    }
    if (isReadOnly()) {
      throw new SecurityException("attempt to add a Permission to a readonly PermissionCollection");
    }
    BundlePermission bp = (BundlePermission)permission;
    String name = bp.getName();
    synchronized (this)
    {
      Map<String, BundlePermission> pc = permissions;
      BundlePermission existing = (BundlePermission)pc.get(name);
      if (existing != null)
      {
        int oldMask = existing.getActionsMask();
        int newMask = bp.getActionsMask();
        if (oldMask != newMask) {
          pc.put(name, new BundlePermission(name, oldMask | 
            newMask));
        }
      }
      else
      {
        pc.put(name, bp);
      }
      if ((!all_allowed) && 
        (name.equals("*"))) {
        all_allowed = true;
      }
    }
  }
  
  public boolean implies(Permission permission)
  {
    if (!(permission instanceof BundlePermission)) {
      return false;
    }
    BundlePermission requested = (BundlePermission)permission;
    String requestedName = requested.getName();
    int desired = requested.getActionsMask();
    int effective = 0;
    synchronized (this)
    {
      Map<String, BundlePermission> pc = permissions;
      if (all_allowed)
      {
        BundlePermission bp = (BundlePermission)pc.get("*");
        if (bp != null)
        {
          effective |= bp.getActionsMask();
          if ((effective & desired) == desired) {
            return true;
          }
        }
      }
      BundlePermission bp = (BundlePermission)pc.get(requestedName);
      if (bp != null)
      {
        effective |= bp.getActionsMask();
        if ((effective & desired) == desired) {
          return true;
        }
      }
      int offset = requestedName.length() - 1;
      int last;
      while ((last = requestedName.lastIndexOf(".", offset)) != -1)
      {
        int last;
        requestedName = requestedName.substring(0, last + 1) + "*";
        bp = (BundlePermission)pc.get(requestedName);
        if (bp != null)
        {
          effective |= bp.getActionsMask();
          if ((effective & desired) == desired) {
            return true;
          }
        }
        offset = last - 1;
      }
      return false;
    }
  }
  
  public synchronized Enumeration<Permission> elements()
  {
    List<Permission> all = new ArrayList(permissions.values());
    return Collections.enumeration(all);
  }
  
  private static final ObjectStreamField[] serialPersistentFields = {
    new ObjectStreamField("permissions", Hashtable.class), 
    new ObjectStreamField("all_allowed", Boolean.TYPE) };
  
  private synchronized void writeObject(ObjectOutputStream out)
    throws IOException
  {
    Hashtable<String, BundlePermission> hashtable = new Hashtable(
      permissions);
    ObjectOutputStream.PutField pfields = out.putFields();
    pfields.put("permissions", hashtable);
    pfields.put("all_allowed", all_allowed);
    out.writeFields();
  }
  
  private synchronized void readObject(ObjectInputStream in)
    throws IOException, ClassNotFoundException
  {
    ObjectInputStream.GetField gfields = in.readFields();
    Hashtable<String, BundlePermission> hashtable = (Hashtable)gfields
      .get("permissions", null);
    permissions = new HashMap(hashtable);
    all_allowed = gfields.get("all_allowed", false);
  }
}

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

public abstract interface BundleReference
{
  public abstract Bundle getBundle();
}

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

import java.security.PrivilegedAction;
import java.util.Map;

class CapabilityPermission$1
  implements PrivilegedAction<Object>
{
  final CapabilityPermission this$0;
  
  CapabilityPermission$1(CapabilityPermission paramCapabilityPermission, Map paramMap) {}
  
  public Object run()
  {
    val$props.put("id", new Long(this$0.bundle.getBundleId()));
    val$props.put("location", this$0.bundle.getLocation());
    String name = this$0.bundle.getSymbolicName();
    if (name != null) {
      val$props.put("name", name);
    }
    SignerProperty signer = new SignerProperty(this$0.bundle);
    if (signer.isBundleSigned()) {
      val$props.put("signer", signer);
    }
    return null;
  }
}

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

import java.util.AbstractMap;
import java.util.Collections;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

final class CapabilityPermission$Properties
  extends AbstractMap<String, Object>
{
  private final Map<String, Object> properties;
  private final Map<String, Object> attributes;
  private volatile transient Set<Map.Entry<String, Object>> entries;
  
  CapabilityPermission$Properties(Map<String, Object> properties, Map<String, Object> attributes)
  {
    this.properties = properties;
    this.attributes = attributes;
    entries = null;
  }
  
  public Object get(Object k)
  {
    if (!(k instanceof String)) {
      return null;
    }
    String key = (String)k;
    if (key.charAt(0) == '@') {
      return attributes.get(key.substring(1));
    }
    Object value = properties.get(key);
    if (value != null) {
      return value;
    }
    return attributes.get(key);
  }
  
  public Set<Map.Entry<String, Object>> entrySet()
  {
    if (entries != null) {
      return entries;
    }
    Set<Map.Entry<String, Object>> all = new HashSet(
      attributes.size() + properties.size());
    all.addAll(attributes.entrySet());
    all.addAll(properties.entrySet());
    return entries = Collections.unmodifiableSet(all);
  }
}

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

import java.io.IOException;
import java.io.NotSerializableException;
import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.security.AccessController;
import java.security.BasicPermission;
import java.security.Permission;
import java.security.PermissionCollection;
import java.security.PrivilegedAction;
import java.util.AbstractMap;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

public final class CapabilityPermission
  extends BasicPermission
{
  static final long serialVersionUID = -7662148639076511574L;
  public static final String REQUIRE = "require";
  public static final String PROVIDE = "provide";
  private static final int ACTION_REQUIRE = 1;
  private static final int ACTION_PROVIDE = 2;
  private static final int ACTION_ALL = 3;
  static final int ACTION_NONE = 0;
  transient int action_mask;
  private volatile String actions = null;
  final transient Map<String, Object> attributes;
  final transient Bundle bundle;
  transient Filter filter;
  private volatile transient Map<String, Object> properties;
  
  public CapabilityPermission(String name, String actions)
  {
    this(name, parseActions(actions));
    if ((filter != null) && 
      ((action_mask & 0x3) != 1)) {
      throw new IllegalArgumentException(
        "invalid action string for filter expression");
    }
  }
  
  public CapabilityPermission(String namespace, Map<String, ?> attributes, Bundle providingBundle, String actions)
  {
    super(namespace);
    setTransients(namespace, parseActions(actions));
    if (attributes == null) {
      throw new IllegalArgumentException("attributes must not be null");
    }
    if (providingBundle == null) {
      throw new IllegalArgumentException("bundle must not be null");
    }
    this.attributes = new HashMap(attributes);
    bundle = providingBundle;
    if ((action_mask & 0x3) != 1) {
      throw new IllegalArgumentException("invalid action string");
    }
  }
  
  CapabilityPermission(String name, int mask)
  {
    super(name);
    setTransients(name, mask);
    attributes = null;
    bundle = null;
  }
  
  private void setTransients(String name, int mask)
  {
    if ((mask == 0) || ((mask & 0x3) != mask)) {
      throw new IllegalArgumentException("invalid action string");
    }
    action_mask = mask;
    filter = parseFilter(name);
  }
  
  private static int parseActions(String actions)
  {
    boolean seencomma = false;
    
    int mask = 0;
    if (actions == null) {
      return mask;
    }
    char[] a = actions.toCharArray();
    
    int i = a.length - 1;
    if (i < 0) {}
    while (i != -1)
    {
      return mask;
      char c;
      while ((i != -1) && (
        ((c = a[i]) == ' ') || (c == '\r') || (c == '\n') || 
        (c == '\f') || (c == '\t')))
      {
        char c;
        i--;
      }
      if ((i >= 6) && ((a[(i - 6)] == 'r') || (a[(i - 6)] == 'R')) && 
        ((a[(i - 5)] == 'e') || (a[(i - 5)] == 'E')) && 
        ((a[(i - 4)] == 'q') || (a[(i - 4)] == 'Q')) && 
        ((a[(i - 3)] == 'u') || (a[(i - 3)] == 'U')) && 
        ((a[(i - 2)] == 'i') || (a[(i - 2)] == 'I')) && 
        ((a[(i - 1)] == 'r') || (a[(i - 1)] == 'R')) && (
        (a[i] == 'e') || (a[i] == 'E')))
      {
        int matchlen = 7;
        mask |= 0x1;
      }
      else if ((i >= 6) && ((a[(i - 6)] == 'p') || (a[(i - 6)] == 'P')) && 
        ((a[(i - 5)] == 'r') || (a[(i - 5)] == 'R')) && 
        ((a[(i - 4)] == 'o') || (a[(i - 4)] == 'O')) && 
        ((a[(i - 3)] == 'v') || (a[(i - 3)] == 'V')) && 
        ((a[(i - 2)] == 'i') || (a[(i - 2)] == 'I')) && 
        ((a[(i - 1)] == 'd') || (a[(i - 1)] == 'D')) && (
        (a[i] == 'e') || (a[i] == 'E')))
      {
        int matchlen = 7;
        mask |= 0x2;
      }
      else
      {
        throw new IllegalArgumentException("invalid permission: " + 
          actions);
      }
      int matchlen;
      seencomma = false;
      while ((i >= matchlen) && (!seencomma))
      {
        switch (a[(i - matchlen)])
        {
        case ',': 
          seencomma = true;
        case '\t': 
        case '\n': 
        case '\f': 
        case '\r': 
        case ' ': 
          break;
        default: 
          throw new IllegalArgumentException(
            "invalid permission: " + actions);
        }
        i--;
      }
      i -= matchlen;
    }
    if (seencomma) {
      throw new IllegalArgumentException("invalid permission: " + actions);
    }
    return mask;
  }
  
  private static Filter parseFilter(String filterString)
  {
    filterString = filterString.trim();
    if (filterString.charAt(0) != '(') {
      return null;
    }
    try
    {
      return FrameworkUtil.createFilter(filterString);
    }
    catch (InvalidSyntaxException e)
    {
      IllegalArgumentException iae = new IllegalArgumentException(
        "invalid filter");
      iae.initCause(e);
      throw iae;
    }
  }
  
  public boolean implies(Permission p)
  {
    if (!(p instanceof CapabilityPermission)) {
      return false;
    }
    CapabilityPermission requested = (CapabilityPermission)p;
    if (bundle != null) {
      return false;
    }
    if (filter != null) {
      return false;
    }
    return implies0(requested, 0);
  }
  
  boolean implies0(CapabilityPermission requested, int effective)
  {
    effective |= action_mask;
    int desired = action_mask;
    if ((effective & desired) != desired) {
      return false;
    }
    Filter f = filter;
    if (f == null) {
      return super.implies(requested);
    }
    return f.matches(requested.getProperties());
  }
  
  public String getActions()
  {
    String result = actions;
    if (result == null)
    {
      StringBuffer sb = new StringBuffer();
      boolean comma = false;
      
      int mask = action_mask;
      if ((mask & 0x1) == 1)
      {
        sb.append("require");
        comma = true;
      }
      if ((mask & 0x2) == 2)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("provide");
      }
      actions = (result = sb.toString());
    }
    return result;
  }
  
  public PermissionCollection newPermissionCollection()
  {
    return new CapabilityPermissionCollection();
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof CapabilityPermission)) {
      return false;
    }
    CapabilityPermission cp = (CapabilityPermission)obj;
    
    return (action_mask == action_mask) && (getName().equals(cp.getName())) && ((attributes == attributes) || ((attributes != null) && (attributes.equals(attributes)))) && ((bundle == bundle) || ((bundle != null) && (bundle.equals(bundle))));
  }
  
  public int hashCode()
  {
    int h = 527 + getName().hashCode();
    h = 31 * h + getActions().hashCode();
    if (attributes != null) {
      h = 31 * h + attributes.hashCode();
    }
    if (bundle != null) {
      h = 31 * h + bundle.hashCode();
    }
    return h;
  }
  
  private synchronized void writeObject(ObjectOutputStream s)
    throws IOException
  {
    if (bundle != null) {
      throw new NotSerializableException("cannot serialize");
    }
    if (actions == null) {
      getActions();
    }
    s.defaultWriteObject();
  }
  
  private synchronized void readObject(ObjectInputStream s)
    throws IOException, ClassNotFoundException
  {
    s.defaultReadObject();
    setTransients(getName(), parseActions(actions));
  }
  
  private Map<String, Object> getProperties()
  {
    Map<String, Object> result = properties;
    if (result != null) {
      return result;
    }
    final Map<String, Object> props = new HashMap(5);
    props.put("capability.namespace", getName());
    if (bundle == null) {
      return properties = props;
    }
    AccessController.doPrivileged(new PrivilegedAction()
    {
      public Object run()
      {
        props.put("id", new Long(bundle.getBundleId()));
        props.put("location", bundle.getLocation());
        String name = bundle.getSymbolicName();
        if (name != null) {
          props.put("name", name);
        }
        SignerProperty signer = new SignerProperty(bundle);
        if (signer.isBundleSigned()) {
          props.put("signer", signer);
        }
        return null;
      }
    });
    return properties = new Properties(props, attributes);
  }
  
  private static final class Properties
    extends AbstractMap<String, Object>
  {
    private final Map<String, Object> properties;
    private final Map<String, Object> attributes;
    private volatile transient Set<Map.Entry<String, Object>> entries;
    
    Properties(Map<String, Object> properties, Map<String, Object> attributes)
    {
      this.properties = properties;
      this.attributes = attributes;
      entries = null;
    }
    
    public Object get(Object k)
    {
      if (!(k instanceof String)) {
        return null;
      }
      String key = (String)k;
      if (key.charAt(0) == '@') {
        return attributes.get(key.substring(1));
      }
      Object value = properties.get(key);
      if (value != null) {
        return value;
      }
      return attributes.get(key);
    }
    
    public Set<Map.Entry<String, Object>> entrySet()
    {
      if (entries != null) {
        return entries;
      }
      Set<Map.Entry<String, Object>> all = new HashSet(
        attributes.size() + properties.size());
      all.addAll(attributes.entrySet());
      all.addAll(properties.entrySet());
      return entries = Collections.unmodifiableSet(all);
    }
  }
}

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

import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.ObjectInputStream.GetField;
import java.io.ObjectOutputStream;
import java.io.ObjectOutputStream.PutField;
import java.io.ObjectStreamField;
import java.security.Permission;
import java.security.PermissionCollection;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

final class CapabilityPermissionCollection
  extends PermissionCollection
{
  static final long serialVersionUID = -615322242639008920L;
  private Map<String, CapabilityPermission> permissions;
  private boolean all_allowed;
  private Map<String, CapabilityPermission> filterPermissions;
  
  public CapabilityPermissionCollection()
  {
    permissions = new HashMap();
    all_allowed = false;
  }
  
  public void add(Permission permission)
  {
    if (!(permission instanceof CapabilityPermission)) {
      throw new IllegalArgumentException("invalid permission: " + 
        permission);
    }
    if (isReadOnly()) {
      throw new SecurityException("attempt to add a Permission to a readonly PermissionCollection");
    }
    CapabilityPermission cp = (CapabilityPermission)permission;
    if (bundle != null) {
      throw new IllegalArgumentException("cannot add to collection: " + 
        cp);
    }
    String name = cp.getName();
    Filter f = filter;
    synchronized (this)
    {
      Map<String, CapabilityPermission> pc;
      if (f != null)
      {
        Map<String, CapabilityPermission> pc = filterPermissions;
        if (pc == null) {
          filterPermissions = (pc = new HashMap());
        }
      }
      else
      {
        pc = permissions;
      }
      CapabilityPermission existing = (CapabilityPermission)pc.get(name);
      if (existing != null)
      {
        int oldMask = action_mask;
        int newMask = action_mask;
        if (oldMask != newMask) {
          pc.put(name, new CapabilityPermission(name, oldMask | 
            newMask));
        }
      }
      else
      {
        pc.put(name, cp);
      }
      if ((!all_allowed) && 
        (name.equals("*"))) {
        all_allowed = true;
      }
    }
  }
  
  public boolean implies(Permission permission)
  {
    if (!(permission instanceof CapabilityPermission)) {
      return false;
    }
    CapabilityPermission requested = (CapabilityPermission)permission;
    if (filter != null) {
      return false;
    }
    String requestedName = requested.getName();
    int desired = action_mask;
    int effective = 0;
    Collection<CapabilityPermission> perms;
    synchronized (this)
    {
      pc = permissions;
      if (all_allowed)
      {
        CapabilityPermission cp = (CapabilityPermission)pc.get("*");
        if (cp != null)
        {
          effective |= action_mask;
          if ((effective & desired) == desired) {
            return true;
          }
        }
      }
      CapabilityPermission cp = (CapabilityPermission)pc.get(requestedName);
      if (cp != null)
      {
        effective |= action_mask;
        if ((effective & desired) == desired) {
          return true;
        }
      }
      int offset = requestedName.length() - 1;
      int last;
      while ((last = requestedName.lastIndexOf(".", offset)) != -1)
      {
        int last;
        requestedName = requestedName.substring(0, last + 1) + "*";
        cp = (CapabilityPermission)pc.get(requestedName);
        if (cp != null)
        {
          effective |= action_mask;
          if ((effective & desired) == desired) {
            return true;
          }
        }
        offset = last - 1;
      }
      pc = filterPermissions;
      if (pc == null) {
        return false;
      }
      perms = pc.values();
    }
    Collection<CapabilityPermission> perms;
    for (Map<String, CapabilityPermission> pc = perms.iterator(); pc.hasNext();)
    {
      CapabilityPermission perm = (CapabilityPermission)pc.next();
      if (perm.implies0(requested, effective)) {
        return true;
      }
    }
    return false;
  }
  
  public synchronized Enumeration<Permission> elements()
  {
    List<Permission> all = new ArrayList(permissions.values());
    Map<String, CapabilityPermission> pc = filterPermissions;
    if (pc != null) {
      all.addAll(pc.values());
    }
    return Collections.enumeration(all);
  }
  
  private static final ObjectStreamField[] serialPersistentFields = {
    new ObjectStreamField("permissions", HashMap.class), 
    new ObjectStreamField("all_allowed", Boolean.TYPE), 
    new ObjectStreamField("filterPermissions", HashMap.class) };
  
  private synchronized void writeObject(ObjectOutputStream out)
    throws IOException
  {
    ObjectOutputStream.PutField pfields = out.putFields();
    pfields.put("permissions", permissions);
    pfields.put("all_allowed", all_allowed);
    pfields.put("filterPermissions", filterPermissions);
    out.writeFields();
  }
  
  private synchronized void readObject(ObjectInputStream in)
    throws IOException, ClassNotFoundException
  {
    ObjectInputStream.GetField gfields = in.readFields();
    HashMap<String, CapabilityPermission> p = (HashMap)gfields
      .get("permissions", null);
    permissions = p;
    all_allowed = gfields.get("all_allowed", false);
    HashMap<String, CapabilityPermission> fp = (HashMap)gfields
      .get("filterPermissions", null);
    filterPermissions = fp;
  }
}

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

/**
 * @deprecated
 */
public abstract interface Configurable
{
  /**
   * @deprecated
   */
  public abstract Object getConfigurationObject();
}

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

public abstract interface Constants
{
  public static final String SYSTEM_BUNDLE_LOCATION = "System Bundle";
  public static final String SYSTEM_BUNDLE_SYMBOLICNAME = "system.bundle";
  public static final String BUNDLE_CATEGORY = "Bundle-Category";
  public static final String BUNDLE_CLASSPATH = "Bundle-ClassPath";
  public static final String BUNDLE_COPYRIGHT = "Bundle-Copyright";
  public static final String BUNDLE_DESCRIPTION = "Bundle-Description";
  public static final String BUNDLE_NAME = "Bundle-Name";
  public static final String BUNDLE_NATIVECODE = "Bundle-NativeCode";
  public static final String EXPORT_PACKAGE = "Export-Package";
  /**
   * @deprecated
   */
  public static final String EXPORT_SERVICE = "Export-Service";
  public static final String IMPORT_PACKAGE = "Import-Package";
  public static final String DYNAMICIMPORT_PACKAGE = "DynamicImport-Package";
  /**
   * @deprecated
   */
  public static final String IMPORT_SERVICE = "Import-Service";
  public static final String BUNDLE_VENDOR = "Bundle-Vendor";
  public static final String BUNDLE_VERSION = "Bundle-Version";
  public static final String BUNDLE_DOCURL = "Bundle-DocURL";
  public static final String BUNDLE_CONTACTADDRESS = "Bundle-ContactAddress";
  public static final String BUNDLE_ACTIVATOR = "Bundle-Activator";
  public static final String BUNDLE_UPDATELOCATION = "Bundle-UpdateLocation";
  /**
   * @deprecated
   */
  public static final String PACKAGE_SPECIFICATION_VERSION = "specification-version";
  public static final String BUNDLE_NATIVECODE_PROCESSOR = "processor";
  public static final String BUNDLE_NATIVECODE_OSNAME = "osname";
  public static final String BUNDLE_NATIVECODE_OSVERSION = "osversion";
  public static final String BUNDLE_NATIVECODE_LANGUAGE = "language";
  /**
   * @deprecated
   */
  public static final String BUNDLE_REQUIREDEXECUTIONENVIRONMENT = "Bundle-RequiredExecutionEnvironment";
  public static final String BUNDLE_SYMBOLICNAME = "Bundle-SymbolicName";
  public static final String SINGLETON_DIRECTIVE = "singleton";
  public static final String FRAGMENT_ATTACHMENT_DIRECTIVE = "fragment-attachment";
  public static final String FRAGMENT_ATTACHMENT_ALWAYS = "always";
  public static final String FRAGMENT_ATTACHMENT_RESOLVETIME = "resolve-time";
  public static final String FRAGMENT_ATTACHMENT_NEVER = "never";
  public static final String BUNDLE_LOCALIZATION = "Bundle-Localization";
  public static final String BUNDLE_LOCALIZATION_DEFAULT_BASENAME = "OSGI-INF/l10n/bundle";
  public static final String REQUIRE_BUNDLE = "Require-Bundle";
  public static final String BUNDLE_VERSION_ATTRIBUTE = "bundle-version";
  public static final String FRAGMENT_HOST = "Fragment-Host";
  public static final String SELECTION_FILTER_ATTRIBUTE = "selection-filter";
  public static final String BUNDLE_MANIFESTVERSION = "Bundle-ManifestVersion";
  public static final String VERSION_ATTRIBUTE = "version";
  public static final String BUNDLE_SYMBOLICNAME_ATTRIBUTE = "bundle-symbolic-name";
  public static final String RESOLUTION_DIRECTIVE = "resolution";
  public static final String RESOLUTION_MANDATORY = "mandatory";
  public static final String RESOLUTION_OPTIONAL = "optional";
  public static final String USES_DIRECTIVE = "uses";
  public static final String INCLUDE_DIRECTIVE = "include";
  public static final String EXCLUDE_DIRECTIVE = "exclude";
  public static final String MANDATORY_DIRECTIVE = "mandatory";
  public static final String VISIBILITY_DIRECTIVE = "visibility";
  public static final String VISIBILITY_PRIVATE = "private";
  public static final String VISIBILITY_REEXPORT = "reexport";
  public static final String EXTENSION_DIRECTIVE = "extension";
  public static final String EXTENSION_FRAMEWORK = "framework";
  public static final String EXTENSION_BOOTCLASSPATH = "bootclasspath";
  public static final String BUNDLE_ACTIVATIONPOLICY = "Bundle-ActivationPolicy";
  public static final String ACTIVATION_LAZY = "lazy";
  public static final String FRAMEWORK_VERSION = "org.osgi.framework.version";
  public static final String FRAMEWORK_VENDOR = "org.osgi.framework.vendor";
  public static final String FRAMEWORK_LANGUAGE = "org.osgi.framework.language";
  public static final String FRAMEWORK_OS_NAME = "org.osgi.framework.os.name";
  public static final String FRAMEWORK_OS_VERSION = "org.osgi.framework.os.version";
  public static final String FRAMEWORK_PROCESSOR = "org.osgi.framework.processor";
  /**
   * @deprecated
   */
  public static final String FRAMEWORK_EXECUTIONENVIRONMENT = "org.osgi.framework.executionenvironment";
  public static final String FRAMEWORK_BOOTDELEGATION = "org.osgi.framework.bootdelegation";
  public static final String FRAMEWORK_SYSTEMPACKAGES = "org.osgi.framework.system.packages";
  public static final String FRAMEWORK_SYSTEMPACKAGES_EXTRA = "org.osgi.framework.system.packages.extra";
  public static final String SUPPORTS_FRAMEWORK_EXTENSION = "org.osgi.supports.framework.extension";
  public static final String SUPPORTS_BOOTCLASSPATH_EXTENSION = "org.osgi.supports.bootclasspath.extension";
  public static final String SUPPORTS_FRAMEWORK_FRAGMENT = "org.osgi.supports.framework.fragment";
  public static final String SUPPORTS_FRAMEWORK_REQUIREBUNDLE = "org.osgi.supports.framework.requirebundle";
  public static final String FRAMEWORK_SECURITY = "org.osgi.framework.security";
  public static final String FRAMEWORK_SECURITY_OSGI = "osgi";
  public static final String FRAMEWORK_STORAGE = "org.osgi.framework.storage";
  public static final String FRAMEWORK_STORAGE_CLEAN = "org.osgi.framework.storage.clean";
  public static final String FRAMEWORK_STORAGE_CLEAN_ONFIRSTINIT = "onFirstInit";
  public static final String FRAMEWORK_LIBRARY_EXTENSIONS = "org.osgi.framework.library.extensions";
  public static final String FRAMEWORK_EXECPERMISSION = "org.osgi.framework.command.execpermission";
  public static final String FRAMEWORK_COMMAND_ABSPATH = "abspath";
  public static final String FRAMEWORK_TRUST_REPOSITORIES = "org.osgi.framework.trust.repositories";
  public static final String FRAMEWORK_WINDOWSYSTEM = "org.osgi.framework.windowsystem";
  public static final String FRAMEWORK_BEGINNING_STARTLEVEL = "org.osgi.framework.startlevel.beginning";
  public static final String FRAMEWORK_BUNDLE_PARENT = "org.osgi.framework.bundle.parent";
  public static final String FRAMEWORK_BUNDLE_PARENT_BOOT = "boot";
  public static final String FRAMEWORK_BUNDLE_PARENT_EXT = "ext";
  public static final String FRAMEWORK_BUNDLE_PARENT_APP = "app";
  public static final String FRAMEWORK_BUNDLE_PARENT_FRAMEWORK = "framework";
  public static final String OBJECTCLASS = "objectClass";
  public static final String SERVICE_ID = "service.id";
  public static final String SERVICE_PID = "service.pid";
  public static final String SERVICE_RANKING = "service.ranking";
  public static final String SERVICE_VENDOR = "service.vendor";
  public static final String SERVICE_DESCRIPTION = "service.description";
  public static final String FRAMEWORK_UUID = "org.osgi.framework.uuid";
  public static final String REMOTE_CONFIGS_SUPPORTED = "remote.configs.supported";
  public static final String REMOTE_INTENTS_SUPPORTED = "remote.intents.supported";
  public static final String SERVICE_EXPORTED_CONFIGS = "service.exported.configs";
  public static final String SERVICE_EXPORTED_INTENTS = "service.exported.intents";
  public static final String SERVICE_EXPORTED_INTENTS_EXTRA = "service.exported.intents.extra";
  public static final String SERVICE_EXPORTED_INTERFACES = "service.exported.interfaces";
  public static final String SERVICE_IMPORTED = "service.imported";
  public static final String SERVICE_IMPORTED_CONFIGS = "service.imported.configs";
  public static final String SERVICE_INTENTS = "service.intents";
  public static final String PROVIDE_CAPABILITY = "Provide-Capability";
  public static final String REQUIRE_CAPABILITY = "Require-Capability";
  public static final String EFFECTIVE_DIRECTIVE = "effective";
  public static final String EFFECTIVE_RESOLVE = "resolve";
  public static final String EFFECTIVE_ACTIVE = "active";
  public static final String FILTER_DIRECTIVE = "filter";
  public static final String FRAMEWORK_SYSTEMCAPABILITIES = "org.osgi.framework.system.capabilities";
  public static final String FRAMEWORK_SYSTEMCAPABILITIES_EXTRA = "org.osgi.framework.system.capabilities.extra";
  public static final String FRAMEWORK_BSNVERSION = "org.osgi.framework.bsnversion";
  public static final String FRAMEWORK_BSNVERSION_MULTIPLE = "multiple";
  public static final String FRAMEWORK_BSNVERSION_SINGLE = "single";
}

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

import java.util.Dictionary;
import java.util.Map;

public abstract interface Filter
{
  public abstract boolean match(ServiceReference<?> paramServiceReference);
  
  public abstract boolean match(Dictionary<String, ?> paramDictionary);
  
  public abstract String toString();
  
  public abstract boolean equals(Object paramObject);
  
  public abstract int hashCode();
  
  public abstract boolean matchCase(Dictionary<String, ?> paramDictionary);
  
  public abstract boolean matches(Map<String, ?> paramMap);
}

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

import java.util.EventObject;

public class FrameworkEvent
  extends EventObject
{
  static final long serialVersionUID = 207051004521261705L;
  private final Bundle bundle;
  private final Throwable throwable;
  private final int type;
  public static final int STARTED = 1;
  public static final int ERROR = 2;
  public static final int PACKAGES_REFRESHED = 4;
  public static final int STARTLEVEL_CHANGED = 8;
  public static final int WARNING = 16;
  public static final int INFO = 32;
  public static final int STOPPED = 64;
  public static final int STOPPED_UPDATE = 128;
  public static final int STOPPED_BOOTCLASSPATH_MODIFIED = 256;
  public static final int WAIT_TIMEDOUT = 512;
  
  /**
   * @deprecated
   */
  public FrameworkEvent(int type, Object source)
  {
    super(source);
    this.type = type;
    bundle = null;
    throwable = null;
  }
  
  public FrameworkEvent(int type, Bundle bundle, Throwable throwable)
  {
    super(bundle);
    this.type = type;
    this.bundle = bundle;
    this.throwable = throwable;
  }
  
  public Throwable getThrowable()
  {
    return throwable;
  }
  
  public Bundle getBundle()
  {
    return bundle;
  }
  
  public int getType()
  {
    return type;
  }
}

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

import java.util.EventListener;

public abstract interface FrameworkListener
  extends EventListener
{
  public abstract void frameworkEvent(FrameworkEvent paramFrameworkEvent);
}

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

import java.security.PrivilegedAction;

class FrameworkUtil$1
  implements PrivilegedAction<Object>
{
  private final Class val$classFromBundle;
  
  FrameworkUtil$1(Class paramClass) {}
  
  public Object run()
  {
    return val$classFromBundle.getClassLoader();
  }
}

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

import java.util.AbstractMap;
import java.util.ArrayList;
import java.util.Dictionary;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

final class FrameworkUtil$CaseInsensitiveMap
  extends AbstractMap<String, Object>
  implements Map<String, Object>
{
  private final Dictionary<String, ?> dictionary;
  private final String[] keys;
  
  FrameworkUtil$CaseInsensitiveMap(Dictionary<String, ?> dictionary)
  {
    if (dictionary == null)
    {
      this.dictionary = null;
      keys = new String[0];
      return;
    }
    this.dictionary = dictionary;
    List<String> keyList = new ArrayList(dictionary.size());
    for (Enumeration<?> e = dictionary.keys(); e.hasMoreElements();)
    {
      Object k = e.nextElement();
      if ((k instanceof String))
      {
        String key = (String)k;
        for (Iterator localIterator = keyList.iterator(); localIterator.hasNext();)
        {
          String i = (String)localIterator.next();
          if (key.equalsIgnoreCase(i)) {
            throw new IllegalArgumentException();
          }
        }
        keyList.add(key);
      }
    }
    keys = ((String[])keyList.toArray(new String[keyList.size()]));
  }
  
  public Object get(Object o)
  {
    String k = (String)o;
    String[] arrayOfString;
    int j = (arrayOfString = keys).length;
    for (int i = 0; i < j; i++)
    {
      String key = arrayOfString[i];
      if (key.equalsIgnoreCase(k)) {
        return dictionary.get(key);
      }
    }
    return null;
  }
  
  public Set<Map.Entry<String, Object>> entrySet()
  {
    throw new UnsupportedOperationException();
  }
}

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

import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import javax.security.auth.x500.X500Principal;

final class FrameworkUtil$DNChainMatching
{
  private static final String MINUS_WILDCARD = "-";
  private static final String STAR_WILDCARD = "*";
  
  private static boolean rdnmatch(List<?> rdn, List<?> rdnPattern)
  {
    if (rdn.size() != rdnPattern.size()) {
      return false;
    }
    for (int i = 0; i < rdn.size(); i++)
    {
      String rdnNameValue = (String)rdn.get(i);
      String patNameValue = (String)rdnPattern.get(i);
      int rdnNameEnd = rdnNameValue.indexOf('=');
      int patNameEnd = patNameValue.indexOf('=');
      if ((rdnNameEnd != patNameEnd) || 
        (!rdnNameValue.regionMatches(0, patNameValue, 0, 
        rdnNameEnd))) {
        return false;
      }
      String patValue = patNameValue.substring(patNameEnd);
      String rdnValue = rdnNameValue.substring(rdnNameEnd);
      if ((!rdnValue.equals(patValue)) && (!patValue.equals("=*")) && 
        (!patValue.equals("=#16012a"))) {
        return false;
      }
    }
    return true;
  }
  
  private static boolean dnmatch(List<?> dn, List<?> dnPattern)
  {
    int dnStart = 0;
    int patStart = 0;
    int patLen = dnPattern.size();
    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-2019. Infinite Loop Ltd