1 11 package org.eclipse.ltk.internal.core.refactoring.history; 12 13 import org.eclipse.core.runtime.Assert; 14 15 import org.eclipse.ltk.core.refactoring.RefactoringDescriptorProxy; 16 17 22 final class DefaultRefactoringDescriptorProxy extends RefactoringDescriptorProxy { 23 24 25 private final String fDescription; 26 27 28 private final String fProject; 29 30 31 private final long fTimeStamp; 32 33 43 public DefaultRefactoringDescriptorProxy(final String description, final String project, final long stamp) { 44 Assert.isTrue(project == null || !"".equals(project)); Assert.isTrue(description != null && !"".equals(description)); fDescription= description.intern(); 47 fProject= project != null ? project.intern() : null; 48 fTimeStamp= stamp; 49 } 50 51 54 public String getDescription() { 55 return fDescription; 56 } 57 58 61 public String getProject() { 62 return fProject; 63 } 64 65 68 public long getTimeStamp() { 69 return fTimeStamp; 70 } 71 72 75 public String toString() { 76 77 final StringBuffer buffer= new StringBuffer (128); 78 79 buffer.append(getClass().getName()); 80 buffer.append("[stamp="); buffer.append(fTimeStamp); 82 buffer.append(",project="); buffer.append(fProject); 84 buffer.append(",description="); buffer.append(fDescription); 86 buffer.append("]"); 88 return buffer.toString(); 89 } 90 } 91 | Popular Tags |