1 11 package org.eclipse.osgi.internal.module; 12 13 import org.eclipse.osgi.service.resolver.ImportPackageSpecification; 14 import org.osgi.framework.Constants; 15 16 19 public class ResolverImport extends ResolverConstraint { 20 private String name; 22 23 ResolverImport(ResolverBundle bundle, ImportPackageSpecification ips) { 24 super(bundle, ips); 25 } 26 27 boolean isOptional() { 28 return ImportPackageSpecification.RESOLUTION_OPTIONAL.equals(((ImportPackageSpecification) constraint).getDirective(Constants.RESOLUTION_DIRECTIVE)); 29 } 30 31 boolean isDynamic() { 32 return ImportPackageSpecification.RESOLUTION_DYNAMIC.equals(((ImportPackageSpecification) constraint).getDirective(Constants.RESOLUTION_DIRECTIVE)); 33 } 34 35 public String getName() { 36 if (name != null) 37 return name; return super.getName(); 39 } 40 41 void setName(String requestedPackage) { 43 this.name = requestedPackage; 44 } 45 } 46 | Popular Tags |