1 package spoon.reflect; 2 3 import java.util.ArrayList ; 4 import java.util.List ; 5 6 import spoon.reflect.declaration.CtElement; 7 8 12 public class Changes { 13 14 List <CtElement> added; 15 16 List <CtElement> modified; 17 18 List <CtElement> removed; 19 20 23 public List <CtElement> getAdded() { 24 if (added == null) { 25 added = new ArrayList <CtElement>(); 26 } 27 return added; 28 } 29 30 33 public List <CtElement> getRemoved() { 34 if (removed == null) { 35 removed = new ArrayList <CtElement>(); 36 } 37 return removed; 38 } 39 40 43 public List <CtElement> getModified() { 44 if (modified == null) { 45 modified = new ArrayList <CtElement>(); 46 } 47 return modified; 48 } 49 50 53 public boolean hasAdded() { 54 return added != null && !added.isEmpty(); 55 } 56 57 60 public boolean hasModified() { 61 return modified != null && !modified.isEmpty(); 62 } 63 64 67 public boolean hasRemoved() { 68 return removed != null && !removed.isEmpty(); 69 } 70 71 } 72 | Popular Tags |