1 11 package org.eclipse.jdt.internal.corext.refactoring; 12 13 import java.util.HashMap ; 14 import java.util.Map ; 15 16 import org.eclipse.core.runtime.Assert; 17 18 import org.eclipse.ltk.core.refactoring.RefactoringContribution; 19 import org.eclipse.ltk.core.refactoring.RefactoringDescriptor; 20 import org.eclipse.ltk.core.refactoring.participants.RefactoringArguments; 21 22 31 public final class JavaRefactoringArguments extends RefactoringArguments { 32 33 34 private final Map fAttributes= new HashMap (2); 35 36 37 private String fProject; 38 39 45 public JavaRefactoringArguments(final String project) { 46 Assert.isTrue(project == null || !"".equals(project)); fProject= project; 48 } 49 50 57 public String getAttribute(final String name) { 58 return (String ) fAttributes.get(name); 59 } 60 61 66 public String getProject() { 67 return fProject; 68 } 69 70 78 public void setAttribute(final String name, final String value) { 79 Assert.isNotNull(name); 80 Assert.isNotNull(value); 81 fAttributes.put(name, value); 82 } 83 84 91 public void setProject(final String project) { 92 Assert.isTrue(project == null || !"".equals(project)); fProject= project; 94 } 95 96 99 public String toString() { 100 return getClass().getName() + fAttributes.toString(); 101 } 102 } 103 | Popular Tags |