1 19 20 package com.sslexplorer.language; 21 22 import java.net.URL ; 23 import java.util.ArrayList ; 24 import java.util.Iterator ; 25 import java.util.List ; 26 27 import com.sslexplorer.extensions.ExtensionDescriptor; 28 29 30 39 public class LanguagePackDefinition implements Comparable { 40 41 43 private List classPath; 44 private String name; 45 private String date; 46 private List contains; 47 private ExtensionDescriptor descriptor; 48 49 55 public LanguagePackDefinition(ExtensionDescriptor descriptor, String name) { 56 this(descriptor, name, new ArrayList ()); 57 } 58 59 66 public LanguagePackDefinition(ExtensionDescriptor descriptor, String name, List contains) { 67 classPath = new ArrayList (); 68 this.descriptor = descriptor; 69 this.name = name; 70 this.contains = contains; 71 } 72 73 80 public ExtensionDescriptor getExtensionDescriptor() { 81 return descriptor; 82 } 83 84 89 public void addClassPath(URL url) { 90 classPath.add(url); 91 } 92 93 96 public int compareTo(Object o) { 97 return name.compareTo(((LanguagePackDefinition)o).name); 98 } 99 100 105 public String getName() { 106 return name; 107 } 108 109 114 public void setName(String name) { 115 this.name = name; 116 } 117 118 123 public String getDate() { 124 return date; 125 } 126 127 132 public void setDate(String date) { 133 this.date = date; 134 } 135 136 142 public List getClassPath() { 143 return classPath; 144 } 145 146 152 public List getContains() { 153 return contains; 154 } 155 156 161 public void addLanguage(Language language) { 162 contains.add(language); 163 } 164 165 171 public Iterator languages() { 172 return contains.iterator(); 173 } 174 } 175 | Popular Tags |