blob: d3f8ae3948021b51b00f6d7508aea2d61bb094f2 [file] [log] [blame]
Stuart McCulloch26e7a5a2011-10-17 10:31:43 +00001package aQute.lib.deployer.obr;
2
3public enum CapabilityType {
4
5 PACKAGE("package"),
6 EE("ee"),
7 BUNDLE("bundle"),
8 MODE("mode"),
9 OTHER(null);
10
11 private String typeName;
12
13 CapabilityType(String name) {
14 this.typeName = name;
15 }
16
17 public String getTypeName() {
18 return typeName;
19 }
20
21 /**
22 * @throws IllegalArgumentException
23 */
24 public static CapabilityType getForTypeName(String typeName) {
25 for (CapabilityType type : CapabilityType.values()) {
26 if (type.typeName != null && type.typeName.equals(typeName))
27 return type;
28 }
29 throw new IllegalArgumentException("Unknown capability type: " + typeName);
30 }
31}