1 11 package org.eclipse.jdt.internal.corext.refactoring; 12 13 import org.eclipse.core.runtime.Assert; 14 15 import org.eclipse.jdt.core.dom.ITypeBinding; 16 17 18 public class ReturnTypeInfo { 19 20 private final String fOldTypeName; 21 private String fNewTypeName; 22 private ITypeBinding fNewTypeBinding; 23 24 public ReturnTypeInfo(String returnType) { 25 fOldTypeName= returnType; 26 fNewTypeName= returnType; 27 } 28 29 public String getOldTypeName() { 30 return fOldTypeName; 31 } 32 33 public String getNewTypeName() { 34 return fNewTypeName; 35 } 36 37 public void setNewTypeName(String type){ 38 Assert.isNotNull(type); 39 fNewTypeName= type; 40 } 41 42 public ITypeBinding getNewTypeBinding() { 43 return fNewTypeBinding; 44 } 45 46 public void setNewTypeBinding(ITypeBinding typeBinding){ 47 fNewTypeBinding= typeBinding; 48 } 49 50 public boolean isTypeNameChanged() { 51 return !fOldTypeName.equals(fNewTypeName); 52 } 53 54 public String toString() { 55 return fOldTypeName + " -> " + fNewTypeName; } 57 } 58 | Popular Tags |