1 11 package org.eclipse.core.internal.content; 12 13 import org.eclipse.core.runtime.QualifiedName; 14 import org.eclipse.core.runtime.content.IContentDescription; 15 16 19 public final class DefaultDescription extends BasicDescription { 20 21 public DefaultDescription(IContentTypeInfo contentTypeInfo) { 22 super(contentTypeInfo); 23 } 24 25 public boolean equals(Object obj) { 26 if (!(obj instanceof DefaultDescription)) 27 return false; 28 return contentTypeInfo.equals(((DefaultDescription) obj).contentTypeInfo); 30 } 31 32 35 public String getCharset() { 36 return (String ) getProperty(CHARSET); 37 } 38 39 42 public Object getProperty(QualifiedName key) { 43 return contentTypeInfo.getDefaultProperty(key); 44 } 45 46 public int hashCode() { 47 return contentTypeInfo.getContentType().hashCode(); 48 } 49 50 53 public boolean isRequested(QualifiedName key) { 54 return false; 55 } 56 57 60 public void setProperty(QualifiedName key, Object value) { 61 throw new IllegalStateException (); 62 } 63 64 public String toString() { 65 return "{default} : " + contentTypeInfo.getContentType(); } 67 } 68 | Popular Tags |