1 22 package org.jboss.resource.metadata; 23 24 import java.io.Serializable ; 25 import java.util.Locale ; 26 27 33 public class DescriptionMetaData implements Serializable 34 { 35 static final long serialVersionUID = -3100028904830435509L; 36 37 38 private String lang; 39 40 41 private String description; 42 43 46 public DescriptionMetaData() 47 { 48 this(null); 49 } 50 51 56 public DescriptionMetaData(String lang) 57 { 58 if (lang == null) 59 this.lang = Locale.getDefault().getLanguage(); 60 else 61 this.lang = lang; 62 } 63 64 69 public String getLanguage() 70 { 71 return lang; 72 } 73 74 79 public String getDescription() 80 { 81 return description; 82 } 83 84 89 public void setDescription(String description) 90 { 91 this.description = description; 92 } 93 94 public String toString() 95 { 96 StringBuffer buffer = new StringBuffer (); 97 buffer.append("DescriptionMetaData").append('@'); 98 buffer.append(Integer.toHexString(System.identityHashCode(this))); 99 buffer.append("[language=").append(lang); 100 if (description != null) 101 buffer.append(" description=").append(description); 102 buffer.append(']'); 103 return buffer.toString(); 104 } 105 } 106 | Popular Tags |