1 package ch.ethz.prose.crosscut; 22 import java.lang.IllegalAccessException ; 23 import java.io.Serializable ; 24 import java.lang.InstantiationException ; 25 import java.lang.reflect.Field ; 26 import java.lang.Error ; 27 import java.lang.Class ; 28 import ch.ethz.inf.util.Logger; 29 import java.lang.SecurityException ; 30 import java.lang.ArrayIndexOutOfBoundsException ; 31 32 class SetGetSignaturePattern extends SignaturePattern implements Serializable 33 { 34 private final AbstractCrosscut crosscut; 35 36 37 38 57 protected SetGetSignaturePattern(SetCut crsc) throws MissingInformationException 58 { 59 this.crosscut = crsc; 60 initFromMethod(crsc.getClass(),"SET_ARGS",ANY.class,SetCut.class); 61 } 62 63 64 65 protected SetGetSignaturePattern(GetCut crsc) throws MissingInformationException 66 { 67 this.crosscut = crsc; 68 initFromMethod(crsc.getClass(),"GET_ARGS",ANY.class,GetCut.class); 69 } 70 71 72 73 78 protected boolean matchesOperationOnField(Field field) 79 { 80 if (signatureCathegory == SIGNATURE__EMPTY) 81 return true; 82 else 83 { 84 return getLength() == 2 && matchesTarget(field.getDeclaringClass()) && 86 isAssignable(field.getType(),signature[1]); 87 } 88 } 89 90 91 92 public String toString() 93 { 94 return methodObj.toString(); 95 } 96 } 97
| Popular Tags
|