1 11 package org.eclipse.ltk.core.refactoring; 12 13 import org.eclipse.core.runtime.Assert; 14 15 60 public class RefactoringSessionDescriptor { 61 62 63 public static final String VERSION_1_0= "1.0"; 65 66 private final String fComment; 67 68 69 private final RefactoringDescriptor[] fDescriptors; 70 71 72 private final String fVersion; 73 74 87 public RefactoringSessionDescriptor(final RefactoringDescriptor[] descriptors, final String version, final String comment) { 88 Assert.isNotNull(descriptors); 89 Assert.isTrue(version != null && !"".equals(version)); fDescriptors= new RefactoringDescriptor[descriptors.length]; 91 System.arraycopy(descriptors, 0, fDescriptors, 0, descriptors.length); 92 fVersion= version; 93 fComment= comment; 94 } 95 96 101 public final String getComment() { 102 return (fComment != null) ? fComment : ""; } 104 105 111 public final RefactoringDescriptor[] getRefactorings() { 112 final RefactoringDescriptor[] result= new RefactoringDescriptor[fDescriptors.length]; 113 System.arraycopy(fDescriptors, 0, result, 0, result.length); 114 return result; 115 } 116 117 122 public final String getVersion() { 123 return fVersion; 124 } 125 } 126 | Popular Tags |