1 11 package org.eclipse.osgi.internal.resolver; 12 13 import org.eclipse.osgi.service.resolver.*; 14 15 public abstract class VersionConstraintImpl implements VersionConstraint { 16 private String name; 17 private VersionRange versionRange; 18 private BundleDescription bundle; 19 private BaseDescription supplier; 20 21 public String getName() { 22 return name; 23 } 24 25 public VersionRange getVersionRange() { 26 if (versionRange == null) 27 return VersionRange.emptyRange; 28 return versionRange; 29 } 30 31 public BundleDescription getBundle() { 32 return bundle; 33 } 34 35 public boolean isResolved() { 36 return supplier != null; 37 } 38 39 public BaseDescription getSupplier() { 40 return supplier; 41 } 42 43 public boolean isSatisfiedBy(BaseDescription supplier) { 44 return false; 45 } 46 protected void setName(String name) { 47 this.name = name; 48 } 49 50 protected void setVersionRange(VersionRange versionRange) { 51 this.versionRange = versionRange; 52 } 53 54 protected void setBundle(BundleDescription bundle) { 55 this.bundle = bundle; 56 } 57 58 protected void setSupplier(BaseDescription supplier) { 59 this.supplier = supplier; 60 } 61 } 62 | Popular Tags |