org.eclipse.osgi_3.7.2.v20120110-1415

transient String[] objectClass;
  transient Filter filter;
  private volatile transient Map<String, Object> properties;
  private transient boolean wildcard;
  private transient String prefix;
  
  public ServicePermission(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 ServicePermission(ServiceReference<?> reference, String actions)
  {
    super(createName(reference));
    setTransients(null, parseActions(actions));
    service = reference;
    objectClass = 
      ((String[])reference.getProperty("objectClass"));
    if ((action_mask & 0x3) != 1) {
      throw new IllegalArgumentException("invalid action string");
    }
  }
  
  private static String createName(ServiceReference<?> reference)
  {
    if (reference == null) {
      throw new IllegalArgumentException("reference must not be null");
    }
    StringBuffer sb = new StringBuffer("(service.id=");
    sb.append(reference.getProperty("service.id"));
    sb.append(")");
    return sb.toString();
  }
  
  ServicePermission(String name, int mask)
  {
    super(name);
    setTransients(parseFilter(name), mask);
    service = null;
    objectClass = null;
  }
  
  private void setTransients(Filter f, int mask)
  {
    if ((mask == 0) || ((mask & 0x3) != mask)) {
      throw new IllegalArgumentException("invalid action string");
    }
    action_mask = mask;
    filter = f;
    if (f == null)
    {
      String name = getName();
      int l = name.length();
      
      wildcard = ((name.charAt(l - 1) == '*') && ((l == 1) || 
        (name.charAt(l - 2) == '.')));
      if ((wildcard) && (l > 1)) {
        prefix = name.substring(0, l - 1);
      }
    }
  }
  
  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 >= 2) && ((a[(i - 2)] == 'g') || (a[(i - 2)] == 'G')) && 
        ((a[(i - 1)] == 'e') || (a[(i - 1)] == 'E')) && (
        (a[i] == 't') || (a[i] == 'T')))
      {
        int matchlen = 3;
        mask |= 0x1;
      }
      else if ((i >= 7) && ((a[(i - 7)] == 'r') || (a[(i - 7)] == 'R')) && 
        ((a[(i - 6)] == 'e') || (a[(i - 6)] == 'E')) && 
        ((a[(i - 5)] == 'g') || (a[(i - 5)] == 'G')) && 
        ((a[(i - 4)] == 'i') || (a[(i - 4)] == 'I')) && 
        ((a[(i - 3)] == 's') || (a[(i - 3)] == 'S')) && 
        ((a[(i - 2)] == 't') || (a[(i - 2)] == 'T')) && 
        ((a[(i - 1)] == 'e') || (a[(i - 1)] == 'E')) && (
        (a[i] == 'r') || (a[i] == 'R')))
      {
        int matchlen = 8;
        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 ServicePermission)) {
      return false;
    }
    ServicePermission requested = (ServicePermission)p;
    if (service != null) {
      return false;
    }
    if (filter != null) {
      return false;
    }
    return implies0(requested, 0);
  }
  
  boolean implies0(ServicePermission requested, int effective)
  {
    effective |= action_mask;
    int desired = action_mask;
    if ((effective & desired) != desired) {
      return false;
    }
    if ((wildcard) && (prefix == null)) {
      return true;
    }
    Filter f = filter;
    if (f != null) {
      return f.matches(requested.getProperties());
    }
    String[] requestedNames = objectClass;
    if (requestedNames == null) {
      return super.implies(requested);
    }
    if (wildcard)
    {
      int pl = prefix.length();
      int i = 0;
      for (int l = requestedNames.length; i < l; i++)
      {
        String requestedName = requestedNames[i];
        if ((requestedName.length() > pl) && 
          (requestedName.startsWith(prefix))) {
          return true;
        }
      }
    }
    else
    {
      String name = getName();
      int i = 0;
      for (int l = requestedNames.length; i < l; i++) {
        if (requestedNames[i].equals(name)) {
          return true;
        }
      }
    }
    return false;
  }
  
  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("get");
        comma = true;
      }
      if ((mask & 0x2) == 2)
      {
        if (comma) {
          sb.append(',');
        }
        sb.append("register");
      }
      actions = (result = sb.toString());
    }
    return result;
  }
  
  public PermissionCollection newPermissionCollection()
  {
    return new ServicePermissionCollection();
  }
  
  public boolean equals(Object obj)
  {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof ServicePermission)) {
      return false;
    }
    ServicePermission sp = (ServicePermission)obj;
    
    return (action_mask == action_mask) && (getName().equals(sp.getName())) && ((service == service) || ((service != null) && (service.compareTo(service) == 0)));
  }
  
  public int hashCode()
  {
    int h = 527 + getName().hashCode();
    h = 31 * h + getActions().hashCode();
    if (service != null) {
      h = 31 * h + service.hashCode();
    }
    return h;
  }
  
  private synchronized void writeObject(ObjectOutputStream s)
    throws IOException
  {
    if (service != null) {
      throw new NotSerializableException("cannot serialize");
    }
    if (actions == null) {
      getActions();
    }
    s.defaultWriteObject();
  }
  
  private synchronized void readObject(ObjectInputStream s)
    throws IOException, ClassNotFoundException
  {
    s.defaultReadObject();
    setTransients(parseFilter(getName()), parseActions(actions));
  }
  
  private Map<String, Object> getProperties()
  {
    Map<String, Object> result = properties;
    if (result != null) {
      return result;
    }
    if (service == null)
    {
      result = new HashMap(1);
      result.put("objectClass", new String[] { getName() });
      return properties = result;
    }
    final Map<String, Object> props = new HashMap(4);
    final Bundle bundle = service.getBundle();
    if (bundle != null) {
      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, service);
  }
  
  private static final class Properties
    extends AbstractMap<String, Object>
  {
    private final Map<String, Object> properties;
    private final ServiceReference<?> service;
    private volatile transient Set<Map.Entry<String, Object>> entries;
    
    Properties(Map<String, Object> properties, ServiceReference<?> service)
    {
      this.properties = properties;
      this.service = service;
      entries = null;
    }
    
    public Object get(Object k)
    {
      if (!(k instanceof String)) {
        return null;
      }
      String key = (String)k;
      if (key.charAt(0) == '@') {
        return service.getProperty(key.substring(1));
      }
      Object value = properties.get(key);
      if (value != null) {
        return value;
      }
      return service.getProperty(key);
    }
    
    public Set<Map.Entry<String, Object>> entrySet()
    {
      if (entries != null) {
        return entries;
      }
      Set<Map.Entry<String, Object>> all = new HashSet(
        properties.entrySet());
      String[] arrayOfString;
      int j = (arrayOfString = service.getPropertyKeys()).length;
      for (int i = 0; i < j; i++)
      {
        String key = arrayOfString[i];
        for (Iterator localIterator = properties.keySet().iterator(); localIterator.hasNext();)
        {
          String k = (String)localIterator.next();
          if (key.equalsIgnoreCase(k)) {
            break;
          }
        }
        all.add(new Entry(key, service.getProperty(key)));
      }
      return entries = Collections.unmodifiableSet(all);
    }
    
    private static final class Entry
      implements Map.Entry<String, Object>
    {
      private final String k;
      private final Object v;
      
      Entry(String key, Object value)
      {
        k = key;
        v = value;
      }
      
      public String getKey()
      {
        return k;
      }
      
      public Object getValue()
      {
        return v;
      }
      
      public Object setValue(Object value)
      {
        throw new UnsupportedOperationException();
      }
      
      public String toString()
      {
        return k + "=" + v;
      }
      
      public int hashCode()
      {
        return (k == null ? 0 : k.hashCode()) ^ 
          (v == null ? 0 : v.hashCode());
      }
      
      public boolean equals(Object obj)
      {
        if (obj == this) {
          return true;
        }
        if (!(obj instanceof Map.Entry)) {
          return false;
        }
        Map.Entry<?, ?> e = (Map.Entry)obj;
        Object key = e.getKey();
        if ((k == key) || ((k != null) && (k.equals(key))))
        {
          Object value = e.getValue();
          if ((v == value) || ((v != null) && (v.equals(value)))) {
            return true;
          }
        }
        return false;
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.osgi.framework.ServicePermission
 * 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.Hashtable;
import java.util.Iterator;
import java.util.List;
import java.util.Map;

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

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

public abstract interface ServiceReference<S>
  extends Comparable<Object>
{
  public abstract Object getProperty(String paramString);
  
  public abstract String[] getPropertyKeys();
  
  public abstract Bundle getBundle();
  
  public abstract Bundle[] getUsingBundles();
  
  public abstract boolean isAssignableTo(Bundle paramBundle, String paramString);
  
  public abstract int compareTo(Object paramObject);
}

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

import java.util.Dictionary;

public abstract interface ServiceRegistration<S>
{
  public abstract ServiceReference<S> getReference();
  
  public abstract void setProperties(Dictionary<String, ?> paramDictionary);
  
  public abstract void unregister();
}

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

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;

final class SignerProperty
{
  private final Bundle bundle;
  private final String pattern;
  
  public SignerProperty(String pattern)
  {
    this.pattern = pattern;
    bundle = null;
  }
  
  SignerProperty(Bundle bundle)
  {
    this.bundle = bundle;
    pattern = null;
  }
  
  public boolean equals(Object o)
  {
    if (!(o instanceof SignerProperty)) {
      return false;
    }
    SignerProperty other = (SignerProperty)o;
    Bundle matchBundle = bundle != null ? bundle : bundle;
    String matchPattern = bundle != null ? pattern : pattern;
    Map<X509Certificate, List<X509Certificate>> signers = matchBundle
      .getSignerCertificates(2);
    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 signerCert = (X509Certificate)localIterator2.next();
        dnChain.add(signerCert.getSubjectDN().getName());
      }
      try
      {
        if (FrameworkUtil.matchDistinguishedNameChain(matchPattern, 
          dnChain)) {
          return true;
        }
      }
      catch (IllegalArgumentException localIllegalArgumentException) {}
    }
    return false;
  }
  
  public int hashCode()
  {
    return 31;
  }
  
  boolean isBundleSigned()
  {
    if (bundle == null) {
      return false;
    }
    Map<X509Certificate, List<X509Certificate>> signers = bundle
      .getSignerCertificates(2);
    return !signers.isEmpty();
  }
}

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

public abstract interface SynchronousBundleListener
  extends BundleListener
{}

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

import java.util.NoSuchElementException;
import java.util.StringTokenizer;

public class Version
  implements Comparable<Version>
{
  private final int major;
  private final int minor;
  private final int micro;
  private final String qualifier;
  private static final String SEPARATOR = ".";
  private transient String versionString;
  public static final Version emptyVersion = new Version(0, 0, 0);
  
  public Version(int major, int minor, int micro)
  {
    this(major, minor, micro, null);
  }
  
  public Version(int major, int minor, int micro, String qualifier)
  {
    if (qualifier == null) {
      qualifier = "";
    }
    this.major = major;
    this.minor = minor;
    this.micro = micro;
    this.qualifier = qualifier;
    versionString = null;
    validate();
  }
  
  public Version(String version)
  {
    int maj = 0;
    int min = 0;
    int mic = 0;
    String qual = "";
    try
    {
      StringTokenizer st = new StringTokenizer(version, ".", true);
      maj = Integer.parseInt(st.nextToken());
      if (st.hasMoreTokens())
      {
        st.nextToken();
        min = Integer.parseInt(st.nextToken());
        if (st.hasMoreTokens())
        {
          st.nextToken();
          mic = Integer.parseInt(st.nextToken());
          if (st.hasMoreTokens())
          {
            st.nextToken();
            qual = st.nextToken("");
            if (st.hasMoreTokens()) {
              throw new IllegalArgumentException(
                "invalid format: " + version);
            }
          }
        }
      }
    }
    catch (NoSuchElementException e)
    {
      IllegalArgumentException iae = new IllegalArgumentException(
        "invalid format: " + version);
      iae.initCause(e);
      throw iae;
    }
    major = maj;
    minor = min;
    micro = mic;
    qualifier = qual;
    versionString = null;
    validate();
  }
  
  private void validate()
  {
    if (major < 0) {
      throw new IllegalArgumentException("negative major");
    }
    if (minor < 0) {
      throw new IllegalArgumentException("negative minor");
    }
    if (micro < 0) {
      throw new IllegalArgumentException("negative micro");
    }
    char[] chars = qualifier.toCharArray();
    int i = 0;
    for (int length = chars.length; i < length; i++)
    {
      char ch = chars[i];
      if (('A' > ch) || (ch > 'Z')) {
        if (('a' > ch) || (ch > 'z')) {
          if (('0' > ch) || (ch > '9')) {
            if ((ch != '_') && (ch != '-')) {
              throw new IllegalArgumentException("invalid qualifier: " + 
                qualifier);
            }
          }
        }
      }
    }
  }
  
  public static Version parseVersion(String version)
  {
    if (version == null) {
      return emptyVersion;
    }
    version = version.trim();
    if (version.length() == 0) {
      return emptyVersion;
    }
    return new Version(version);
  }
  
  public int getMajor()
  {
    return major;
  }
  
  public int getMinor()
  {
    return minor;
  }
  
  public int getMicro()
  {
    return micro;
  }
  
  public String getQualifier()
  {
    return qualifier;
  }
  
  public String toString()
  {
    if (versionString != null) {
      return versionString;
    }
    int q = qualifier.length();
    StringBuffer result = new StringBuffer(20 + q);
    result.append(major);
    result.append(".");
    result.append(minor);
    result.append(".");
    result.append(micro);
    if (q > 0)
    {
      result.append(".");
      result.append(qualifier);
    }
    return versionString = result.toString();
  }
  
  public int hashCode()
  {
    return (major << 24) + (minor << 16) + (micro << 8) + 
      qualifier.hashCode();
  }
  
  public boolean equals(Object object)
  {
    if (object == this) {
      return true;
    }
    if (!(object instanceof Version)) {
      return false;
    }
    Version other = (Version)object;
    
    return (major == major) && (minor == minor) && (micro == micro) && (qualifier.equals(qualifier));
  }
  
  public int compareTo(Version other)
  {
    if (other == this) {
      return 0;
    }
    int result = major - major;
    if (result != 0) {
      return result;
    }
    result = minor - minor;
    if (result != 0) {
      return result;
    }
    result = micro - micro;
    if (result != 0) {
      return result;
    }
    return qualifier.compareTo(qualifier);
  }
}

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

import java.util.Collection;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;

public abstract interface EventHook
{
  public abstract void event(BundleEvent paramBundleEvent, Collection<BundleContext> paramCollection);
}

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

import java.util.Collection;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;

public abstract interface FindHook
{
  public abstract void find(BundleContext paramBundleContext, Collection<Bundle> paramCollection);
}

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

import java.util.Collection;
import org.osgi.framework.wiring.BundleCapability;
import org.osgi.framework.wiring.BundleRequirement;
import org.osgi.framework.wiring.BundleRevision;

public abstract interface ResolverHook
{
  public abstract void filterResolvable(Collection<BundleRevision> paramCollection);
  
  public abstract void filterSingletonCollisions(BundleCapability paramBundleCapability, Collection<BundleCapability> paramCollection);
  
  public abstract void filterMatches(BundleRequirement paramBundleRequirement, Collection<BundleCapability> paramCollection);
  
  public abstract void end();
}

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

import java.util.Collection;
import org.osgi.framework.wiring.BundleRevision;

public abstract interface ResolverHookFactory
{
  public abstract ResolverHook begin(Collection<BundleRevision> paramCollection);
}

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

import java.util.Collection;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceEvent;

/**
 * @deprecated
 */
public abstract interface EventHook
{
  public abstract void event(ServiceEvent paramServiceEvent, Collection<BundleContext> paramCollection);
}

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

import java.util.Collection;
import java.util.Map;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceEvent;

public abstract interface EventListenerHook
{
  public abstract void event(ServiceEvent paramServiceEvent, Map<BundleContext, Collection<ListenerHook.ListenerInfo>> paramMap);
}

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

import java.util.Collection;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;

public abstract interface FindHook
{
  public abstract void find(BundleContext paramBundleContext, String paramString1, String paramString2, boolean paramBoolean, Collection<ServiceReference<?>> paramCollection);
}

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

import org.osgi.framework.BundleContext;

public abstract interface ListenerHook$ListenerInfo
{
  public abstract BundleContext getBundleContext();
  
  public abstract String getFilter();
  
  public abstract boolean isRemoved();
  
  public abstract boolean equals(Object paramObject);
  
  public abstract int hashCode();
}

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

import java.util.Collection;
import org.osgi.framework.BundleContext;

public abstract interface ListenerHook
{
  public abstract void added(Collection<ListenerInfo> paramCollection);
  
  public abstract void removed(Collection<ListenerInfo> paramCollection);
  
  public static abstract interface ListenerInfo
  {
    public abstract BundleContext getBundleContext();
    
    public abstract String getFilter();
    
    public abstract boolean isRemoved();
    
    public abstract boolean equals(Object paramObject);
    
    public abstract int hashCode();
  }
}

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

public class WeavingException
  extends RuntimeException
{
  private static final long serialVersionUID = 1L;
  
  public WeavingException(String msg, Throwable cause)
  {
    super(msg, cause);
  }
  
  public WeavingException(String msg)
  {
    super(msg);
  }
}

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

public abstract interface WeavingHook
{
  public abstract void weave(WovenClass paramWovenClass);
}

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

import java.security.ProtectionDomain;
import java.util.List;
import org.osgi.framework.wiring.BundleWiring;

public abstract interface WovenClass
{
  public abstract byte[] getBytes();
  
  public abstract void setBytes(byte[] paramArrayOfByte);
  
  public abstract List<String> getDynamicImports();
  
  public abstract boolean isWeavingComplete();
  
  public abstract String getClassName();
  
  public abstract ProtectionDomain getProtectionDomain();
  
  public abstract Class<?> getDefinedClass();
  
  public abstract BundleWiring getBundleWiring();
}

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

import java.io.InputStream;
import java.net.URL;
import java.util.Enumeration;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleException;
import org.osgi.framework.FrameworkEvent;

public abstract interface Framework
  extends Bundle
{
  public abstract void init()
    throws BundleException;
  
  public abstract FrameworkEvent waitForStop(long paramLong)
    throws InterruptedException;
  
  public abstract void start()
    throws BundleException;
  
  public abstract void start(int paramInt)
    throws BundleException;
  
  public abstract void stop()
    throws BundleException;
  
  public abstract void stop(int paramInt)
    throws BundleException;
  
  public abstract void uninstall()
    throws BundleException;
  
  public abstract void update()
    throws BundleException;
  
  public abstract void update(InputStream paramInputStream)
    throws BundleException;
  
  public abstract long getBundleId();
  
  public abstract String getLocation();
  
  public abstract String getSymbolicName();
  
  public abstract Enumeration<String> getEntryPaths(String paramString);
  
  public abstract URL getEntry(String paramString);
  
  public abstract Enumeration<URL> findEntries(String paramString1, String paramString2, boolean paramBoolean);
  
  public abstract <A> A adapt(Class<A> paramClass);
}

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

import java.util.Map;

public abstract interface FrameworkFactory
{
  public abstract Framework newFramework(Map<String, String> paramMap);
}

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

import org.osgi.framework.BundleReference;

public abstract interface BundleStartLevel
  extends BundleReference
{
  public abstract int getStartLevel();
  
  public abstract void setStartLevel(int paramInt);
  
  public abstract boolean isPersistentlyStarted();
  
  public abstract boolean isActivationPolicyUsed();
}

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

import org.osgi.framework.BundleReference;
import org.osgi.framework.FrameworkListener;

public abstract interface FrameworkStartLevel
  extends BundleReference
{
  public abstract int getStartLevel();
  
  public abstract void setStartLevel(int paramInt, FrameworkListener[] paramArrayOfFrameworkListener);
  
  public abstract int getInitialBundleStartLevel();
  
  public abstract void setInitialBundleStartLevel(int paramInt);
}

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

import java.util.Map;

public abstract interface BundleCapability
{
  public abstract String getNamespace();
  
  public abstract Map<String, String> getDirectives();
  
  public abstract Map<String, Object> getAttributes();
  
  public abstract BundleRevision getRevision();
}

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

import java.util.Map;

public abstract interface BundleRequirement
{
  public abstract String getNamespace();
  
  public abstract Map<String, String> getDirectives();
  
  public abstract Map<String, Object> getAttributes();
  
  public abstract BundleRevision getRevision();
  
  public abstract boolean matches(BundleCapability paramBundleCapability);
}

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

import java.util.List;
import org.osgi.framework.BundleReference;
import org.osgi.framework.Version;

public abstract interface BundleRevision
  extends BundleReference
{
  public static final String PACKAGE_NAMESPACE = "osgi.wiring.package";
  public static final String BUNDLE_NAMESPACE = "osgi.wiring.bundle";
  public static final String HOST_NAMESPACE = "osgi.wiring.host";
  public static final int TYPE_FRAGMENT = 1;
  
  public abstract String getSymbolicName();
  
  public abstract Version getVersion();
  
  public abstract List<BundleCapability> getDeclaredCapabilities(String paramString);
  
  public abstract List<BundleRequirement> getDeclaredRequirements(String paramString);
  
  public abstract int getTypes();
  
  public abstract BundleWiring getWiring();
}

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

import java.util.List;
import org.osgi.framework.BundleReference;

public abstract interface BundleRevisions
  extends BundleReference
{
  public abstract List<BundleRevision> getRevisions();
}

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

public abstract interface BundleWire
{
  public abstract BundleCapability getCapability();
  
  public abstract BundleRequirement getRequirement();
  
  public abstract BundleWiring getProviderWiring();
  
  public abstract BundleWiring getRequirerWiring();
}

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

import java.net.URL;
import java.util.Collection;
import java.util.List;
import org.osgi.framework.BundleReference;

public abstract interface BundleWiring
  extends BundleReference
{
  public static final int FINDENTRIES_RECURSE = 1;
  public static final int LISTRESOURCES_RECURSE = 1;
  public static final int LISTRESOURCES_LOCAL = 2;
  
  public abstract boolean isCurrent();
  
  public abstract boolean isInUse();
  
  public abstract List<BundleCapability> getCapabilities(String paramString);
  
  public abstract List<BundleRequirement> getRequirements(String paramString);
  
  public abstract List<BundleWire> getProvidedWires(String paramString);
  
  public abstract List<BundleWire> getRequiredWires(String paramString);
  
  public abstract BundleRevision getRevision();
  
  public abstract ClassLoader getClassLoader();
  
  public abstract List<URL> findEntries(String paramString1, String paramString2, int paramInt);
  
  public abstract Collection<String> listResources(String paramString1, String paramString2, int paramInt);
}

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

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.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;
  }
  
  
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