1 17 18 package org.objectweb.jac.core.rtti; 19 20 import java.io.Serializable ; 21 import java.util.Hashtable ; 22 import java.util.Map ; 23 24 public class ClassInfo implements Serializable { 25 Map methodInfos = new Hashtable (); 26 public MethodInfo getMethodInfo(String method) { 27 MethodInfo methodinfo = (MethodInfo)methodInfos.get(method); 28 if (methodinfo==null) { 29 methodinfo = new MethodInfo(); 30 methodInfos.put(method,methodinfo); 31 } 32 return methodinfo; 33 } 34 public void addModifiedField(String method, String field) { 35 getMethodInfo(method).modifiedFields.add(field); 36 } 37 public void addAccessedField(String method, String field) { 38 getMethodInfo(method).accessedFields.add(field); 39 } 40 public void setReturnedField(String method, String field) { 41 getMethodInfo(method).returnedField = field; 42 } 43 public void setIsGetter(String method, boolean isGetter) { 44 getMethodInfo(method).isGetter = isGetter; 45 } 46 public void addSetField(String method, String field) { 47 getMethodInfo(method).setFields.add(field); 48 } 49 public void addAddedCollection(String method, String field) { 50 getMethodInfo(method).addedCollections.add(field); 51 } 52 public void addRemovedCollection(String method, String field) { 53 getMethodInfo(method).removedCollections.add(field); 54 } 55 public void addModifiedCollection(String method, String field) { 56 getMethodInfo(method).modifiedCollections.add(field); 57 } 58 public void setCollectionIndexArgument(String method, int argument) { 59 getMethodInfo(method).collectionIndexArgument = argument; 60 } 61 public void setCollectionItemArgument(String method, int argument) { 62 getMethodInfo(method).collectionItemArgument = argument; 63 } 64 public void addInvokedMethod(String method,InvokeInfo invokeInfo) { 65 getMethodInfo(method).invokedMethods.add(invokeInfo); 66 } 67 } 68 | Popular Tags |