private FilterImpl parse_not() throws InvalidSyntaxException { int lookahead = pos; skipWhiteSpace(); if (filterChars[pos] != '(') { pos = lookahead - 1; return parse_item(); } FilterImpl child = parse_filter(); return new FilterImpl(FilterImpl.NOT, null, child); }
/** * Package private constructor used by BundlePermissionCollection. * * @param symbolicName the bundle symbolic name * @param mask the action mask */ BundlePermission(String symbolicName, int mask) { super(symbolicName); setTransients(mask); }
/** * Returns a new {@code PermissionCollection} object for storing * {@code CapabilityPermission} objects. * * @return A new {@code PermissionCollection} object suitable for storing * {@code CapabilityPermission} objects. */ @Override public PermissionCollection newPermissionCollection() { return new CapabilityPermissionCollection(); }
public String run() { return reference.getBundle().getBundleContext().getProperty("org.osgi.framework.uuid"); } });
@Override public Object get(Object key) { if (reference == null) { return null; } return reference.getProperty((String) key); }
public String run() { return bundle.getLocation(); } });
/** * Creates a OsgiArchiveDescriptor * * @param persistenceBundle The bundle being described as an archive */ @SuppressWarnings("RedundantCast") public OsgiArchiveDescriptor(Bundle persistenceBundle) { this.persistenceBundle = persistenceBundle; bundleWiring = (BundleWiring) persistenceBundle.adapt( BundleWiring.class ); }
FilterImpl parse() throws InvalidSyntaxException { FilterImpl filter; try { filter = parse_filter(); } catch (ArrayIndexOutOfBoundsException e) { throw new InvalidSyntaxException("Filter ended abruptly", filterstring, e); } if (pos != filterChars.length) { throw new InvalidSyntaxException("Extraneous trailing characters: " + filterstring.substring(pos), filterstring); } return filter; }
/** * Package private constructor used by ServicePermissionCollection. * * @param name class name * @param mask action mask */ ServicePermission(String name, int mask) { super(name); setTransients(parseFilter(name), mask); this.service = null; this.objectClass = null; }
/** * Filter using a service's properties. * <p> * This {@code Filter} is executed using the keys and values of the * referenced service's properties. The keys are looked up in a case * insensitive manner. * * @param reference The reference to the service whose properties are * used in the match. * @return {@code true} if the service's properties match this * {@code Filter}; {@code false} otherwise. */ public boolean match(ServiceReference<?> reference) { return matches(new ServiceReferenceMap(reference)); }
/** * Filter using a {@code Dictionary} with case insensitive key lookup. * This {@code Filter} is executed using the specified * {@code Dictionary}'s keys and values. The keys are looked up in a * case insensitive manner. * * @param dictionary The {@code Dictionary} whose key/value pairs are * used in the match. * @return {@code true} if the {@code Dictionary}'s values match this * filter; {@code false} otherwise. * @throws IllegalArgumentException If {@code dictionary} contains case * variants of the same key name. */ public boolean match(Dictionary<String, ?> dictionary) { return matches(new CaseInsensitiveMap(dictionary)); }
/** * Returns a new {@code PermissionCollection} object for storing * {@code ServicePermission} objects. * * @return A new {@code PermissionCollection} object suitable for storing * {@code ServicePermission} objects. */ @Override public PermissionCollection newPermissionCollection() { return new ServicePermissionCollection(); }
/** * Returns a new {@code PermissionCollection} object suitable for storing * {@code PackagePermission} objects. * * @return A new {@code PermissionCollection} object. */ @Override public PermissionCollection newPermissionCollection() { return new PackagePermissionCollection(); }
/** * Returns a new {@code PermissionCollection} object suitable for storing * {@code AdminPermission}s. * * @return A new {@code PermissionCollection} object. */ @Override public PermissionCollection newPermissionCollection() { return new AdminPermissionCollection(); }
/** * Returns a new {@code PermissionCollection} object suitable for storing * {@code BundlePermission} objects. * * @return A new {@code PermissionCollection} object. */ @Override public PermissionCollection newPermissionCollection() { return new BundlePermissionCollection(); }
/** * Returns a new {@code PermissionCollection} object suitable for storing * {@code AdaptPermission} objects. * * @return A new {@code PermissionCollection} object. */ @Override public PermissionCollection newPermissionCollection() { return new AdaptPermissionCollection(); }
/** * Package private constructor used by CapabilityPermissionCollection. * * @param name class name * @param mask action mask */ CapabilityPermission(String name, int mask) { super(name); setTransients(name, mask); this.attributes = null; this.bundle = null; }
/** * Package private constructor used by PackagePermissionCollection. * * @param name package name * @param mask action mask */ PackagePermission(String name, int mask) { super(name); setTransients(name, mask); this.bundle = null; }
private boolean compare_Collection(int operation, Collection<?> collection, Object value2) { for (Object value1 : collection) { if (compare(operation, value1, value2)) { return true; } } return false; }
private boolean compare_ObjectArray(int operation, Object[] array, Object value2) { for (Object value1 : array) { if (compare(operation, value1, value2)) { return true; } } return false; }