1 package net.sf.invicta.type; 2 3 import java.util.ArrayList ; 4 import java.util.List ; 5 import java.util.StringTokenizer ; 6 7 import net.sf.invicta.InvictaConstants; 8 import net.sf.invicta.api.Target; 9 10 13 public class TargetImpl implements Target { 14 15 protected List dependsList = new ArrayList (); 16 protected String name; 17 protected String ifString; 18 protected String unlessString; 19 protected String description; 20 21 24 public TargetImpl() { 25 super(); 26 } 27 28 31 public TargetImpl(Target other) { 32 super(); 33 this.name = other.getName(); 34 this.dependsList = other.getDependsList(); 35 this.description = other.getDescription(); 36 this.ifString = other.getIf(); 37 this.unlessString = other.getUnless(); 38 } 39 40 44 public String getName() { 45 return name; 46 } 47 48 52 public void setName(String name) { 53 this.name = name; 54 } 55 56 59 public String getDepends() { 60 return null; 61 } 62 63 66 public void setDepends(String dependsListStr) { 67 StringTokenizer st = new StringTokenizer (dependsListStr, InvictaConstants.DEPEND_LIST_DELIMITER); 68 while (st.hasMoreTokens()) 69 this.dependsList.add(st.nextToken().trim()); 70 } 71 72 77 public List getDependsList() { 78 return this.dependsList; 79 } 80 81 85 public String getDescription() { 86 return this.description; 87 } 88 89 93 public String getIf() { 94 return this.ifString; 95 } 96 97 101 public String getUnless() { 102 return this.unlessString; 103 } 104 105 109 public void setDescription(String description) { 110 this.description = description; 111 } 112 113 117 public void setIf(String ifString) { 118 this.ifString = ifString; 119 } 120 121 125 public void setUnless(String unlessString) { 126 this.unlessString = unlessString; 127 } 128 129 } 130 | Popular Tags |