1 32 33 package com.jeantessier.diff; 34 35 import org.apache.log4j.*; 36 37 import com.jeantessier.classreader.*; 38 39 46 public abstract class FeatureDifferences extends RemovableDifferences { 47 private Feature_info oldFeature; 48 private Feature_info newFeature; 49 50 private boolean inherited = false; 51 52 55 protected FeatureDifferences(String name, Feature_info oldFeature, Feature_info newFeature) { 56 super(name); 57 58 setOldFeature(oldFeature); 59 setNewFeature(newFeature); 60 61 if (oldFeature != null) { 62 setOldDeclaration(oldFeature.getDeclaration()); 63 } 64 65 if (newFeature != null) { 66 setNewDeclaration(newFeature.getDeclaration()); 67 } 68 69 if (isModified()) { 70 Logger.getLogger(getClass()).debug(getName() + " declaration has been modified."); 71 } else { 72 Logger.getLogger(getClass()).debug(getName() + " declaration has not been modified."); 73 } 74 } 75 76 public Feature_info getOldFeature() { 77 return oldFeature; 78 } 79 80 protected void setOldFeature(Feature_info oldFeature) { 81 this.oldFeature = oldFeature; 82 } 83 84 public Feature_info getNewFeature() { 85 return newFeature; 86 } 87 88 protected void setNewFeature(Feature_info newFeature) { 89 this.newFeature = newFeature; 90 } 91 92 public boolean isInherited() { 93 return inherited; 94 } 95 96 public void setInherited(boolean inherited) { 97 this.inherited = inherited; 98 } 99 } 100 | Popular Tags |