KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > osgi > internal > module > BundleConstraint


1 /*******************************************************************************
2  * Copyright (c) 2004, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.osgi.internal.module;
12
13 import org.eclipse.osgi.service.resolver.*;
14
15 /*
16  * A companion to BundleSpecification from the state for use while resolving
17  */

18 public class BundleConstraint extends ResolverConstraint {
19     BundleConstraint(ResolverBundle bundle, VersionConstraint bundleConstraint) {
20         super(bundle, bundleConstraint);
21     }
22
23     boolean isOptional() {
24         if (constraint instanceof HostSpecification)
25             return false;
26         return ((BundleSpecification) constraint).isOptional();
27     }
28 }
29
Popular Tags