// !!! Refactor these once all shadow kinds added - there is lots of commonality
if (getKind() == Shadow.MethodCall) {
- ResolvedMember rm[] = this.getTargetType().getDeclaredMethods(world);
+ ResolvedMember rm[] = getSignature().getDeclaringType().getDeclaredMethods(world);
ResolvedMember found = null;
String searchString = getSignature().getName()+getSignature().getParameterSignature();
for (int i = 0; i < rm.length; i++) {
ResolvedTypeX[] anns = found.getAnnotationTypes();
for (int i = 0; i < anns.length; i++) {
ResolvedTypeX typeX = anns[i];
- kindedAnnotationVars.put(typeX,new KindedAnnotationAccessVar(typeX.resolve(world),(BcelVar)getTargetVar(),getSignature()));
+ kindedAnnotationVars.put(typeX,
+ new KindedAnnotationAccessVar(typeX.resolve(world),getSignature().getDeclaringType(),getSignature()));
}
}
if (getKind() == Shadow.MethodExecution) {
- ResolvedMember rm[] = this.getTargetType().getDeclaredMethods(world);
+ ResolvedMember rm[] = getSignature().getDeclaringType().getDeclaredMethods(world);
ResolvedMember found = null;
String searchString = getSignature().getName()+getSignature().getParameterSignature();
for (int i = 0; i < rm.length; i++) {
ResolvedTypeX[] anns = found.getAnnotationTypes();
for (int i = 0; i < anns.length; i++) {
ResolvedTypeX typeX = anns[i];
- kindedAnnotationVars.put(typeX,new KindedAnnotationAccessVar(typeX.resolve(world),(BcelVar)getTargetVar(),getSignature()));
+ kindedAnnotationVars.put(typeX,new KindedAnnotationAccessVar(typeX.resolve(world),getSignature().getDeclaringType(),getSignature()));
}
}
// if (getKind() == Shadow.FieldSet) {
private Member stackField;
private int index;
- BcelVar target;
+ TypeX target;
Member sig;
// public KindedAnnotationAccessVar(ResolvedTypeX type, Member stackField, int index) {
// this.index = index;
// }
- public KindedAnnotationAccessVar(ResolvedTypeX type,BcelVar theTargetIsStoredHere,Member sig) {
+ public KindedAnnotationAccessVar(ResolvedTypeX type,TypeX theTargetIsStoredHere,Member sig) {
super(type,0);
target = theTargetIsStoredHere;
this.sig = sig;
// Calls getClass
// System.err.println("What is the class of target? "+target.getType());
- il.append(fact.createConstant(BcelWorld.makeBcelType(target.getType())));
+ il.append(fact.createConstant(BcelWorld.makeBcelType(target)));
// il.append(target.createLoad(fact));
// il.append(fact.createInvoke("java/lang/Object","getClass",jlClass,new Type[]{},Constants.INVOKEVIRTUAL));