Lines 27-35
Link Here
|
27 |
|
27 |
|
28 |
import org.aspectj.apache.bcel.Constants; |
28 |
import org.aspectj.apache.bcel.Constants; |
29 |
import org.aspectj.apache.bcel.classfile.Field; |
29 |
import org.aspectj.apache.bcel.classfile.Field; |
|
|
30 |
import org.aspectj.apache.bcel.classfile.annotation.Annotation; |
30 |
import org.aspectj.apache.bcel.generic.BranchInstruction; |
31 |
import org.aspectj.apache.bcel.generic.BranchInstruction; |
31 |
import org.aspectj.apache.bcel.generic.CPInstruction; |
32 |
import org.aspectj.apache.bcel.generic.CPInstruction; |
32 |
import org.aspectj.apache.bcel.generic.ConstantPoolGen; |
33 |
import org.aspectj.apache.bcel.generic.ConstantPoolGen; |
|
|
34 |
import org.aspectj.apache.bcel.generic.FieldGen; |
33 |
import org.aspectj.apache.bcel.generic.FieldInstruction; |
35 |
import org.aspectj.apache.bcel.generic.FieldInstruction; |
34 |
import org.aspectj.apache.bcel.generic.INVOKESPECIAL; |
36 |
import org.aspectj.apache.bcel.generic.INVOKESPECIAL; |
35 |
import org.aspectj.apache.bcel.generic.IndexedInstruction; |
37 |
import org.aspectj.apache.bcel.generic.IndexedInstruction; |
Lines 49-54
Link Here
|
49 |
import org.aspectj.apache.bcel.generic.ReturnInstruction; |
51 |
import org.aspectj.apache.bcel.generic.ReturnInstruction; |
50 |
import org.aspectj.apache.bcel.generic.Select; |
52 |
import org.aspectj.apache.bcel.generic.Select; |
51 |
import org.aspectj.apache.bcel.generic.Type; |
53 |
import org.aspectj.apache.bcel.generic.Type; |
|
|
54 |
import org.aspectj.apache.bcel.generic.annotation.AnnotationGen; |
52 |
import org.aspectj.bridge.IMessage; |
55 |
import org.aspectj.bridge.IMessage; |
53 |
import org.aspectj.bridge.ISourceLocation; |
56 |
import org.aspectj.bridge.ISourceLocation; |
54 |
import org.aspectj.bridge.WeaveMessage; |
57 |
import org.aspectj.bridge.WeaveMessage; |
Lines 78-83
Link Here
|
78 |
import org.aspectj.weaver.Shadow.Kind; |
81 |
import org.aspectj.weaver.Shadow.Kind; |
79 |
import org.aspectj.weaver.patterns.DeclareAnnotation; |
82 |
import org.aspectj.weaver.patterns.DeclareAnnotation; |
80 |
import org.aspectj.weaver.patterns.FastMatchInfo; |
83 |
import org.aspectj.weaver.patterns.FastMatchInfo; |
|
|
84 |
import org.aspectj.apache.bcel.classfile.Method; |
85 |
import org.aspectj.apache.bcel.generic.MethodGen; |
81 |
|
86 |
|
82 |
class BcelClassWeaver implements IClassWeaver { |
87 |
class BcelClassWeaver implements IClassWeaver { |
83 |
|
88 |
|
Lines 465-513
Link Here
|
465 |
for (int memberCounter = 0;memberCounter<members.size();memberCounter++) { |
470 |
for (int memberCounter = 0;memberCounter<members.size();memberCounter++) { |
466 |
LazyMethodGen mg = (LazyMethodGen)members.get(memberCounter); |
471 |
LazyMethodGen mg = (LazyMethodGen)members.get(memberCounter); |
467 |
if (!mg.getName().startsWith(NameMangler.PREFIX)) { |
472 |
if (!mg.getName().startsWith(NameMangler.PREFIX)) { |
468 |
|
473 |
|
469 |
// Single first pass |
474 |
// Single first pass |
470 |
List worthRetrying = new ArrayList(); |
475 |
List worthRetrying = new ArrayList(); |
471 |
boolean modificationOccured = false; |
476 |
boolean modificationOccured = false; |
472 |
|
477 |
|
473 |
for (Iterator iter = decaMs.iterator(); iter.hasNext();) { |
478 |
for (Iterator iter = decaMs.iterator(); iter.hasNext();) { |
474 |
DeclareAnnotation decaM = (DeclareAnnotation) iter.next(); |
479 |
DeclareAnnotation decaM = (DeclareAnnotation) iter.next(); |
475 |
|
480 |
|
476 |
if (decaM.matches(mg.getMemberView(),world)) { |
481 |
if (decaM.matches(mg.getMemberView(),world)) { |
477 |
if (doesAlreadyHaveAnnotation(mg.getMemberView(),decaM,reportedProblems)) continue; // skip this one... |
482 |
if (doesAlreadyHaveAnnotation(mg.getMemberView(),decaM,reportedProblems)) continue; // skip this one... |
478 |
mg.addAnnotation(decaM.getAnnotationX()); |
483 |
|
479 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaM.getSourceLocation(),clazz.getName(),mg.getMethod()); |
484 |
Annotation a = decaM.getAnnotationX().getBcelAnnotation(); |
480 |
|
485 |
AnnotationGen ag = new AnnotationGen(a,clazz.getConstantPoolGen(),true); |
481 |
reportMethodCtorWeavingMessage(clazz, mg, decaM); |
486 |
Method oldMethod = mg.getMethod(); |
482 |
isChanged = true; |
487 |
MethodGen myGen = new MethodGen(oldMethod,clazz.getClassName(),clazz.getConstantPoolGen()); |
483 |
modificationOccured = true; |
488 |
myGen.addAnnotation(ag); |
484 |
} else { |
489 |
Method newMethod = myGen.getMethod(); |
485 |
if (!decaM.isStarredAnnotationPattern()) |
490 |
mg.addAnnotation(decaM.getAnnotationX()); |
486 |
worthRetrying.add(decaM); // an annotation is specified that might be put on by a subsequent decaf |
491 |
members.set(memberCounter,new LazyMethodGen(newMethod,clazz)); |
487 |
} |
492 |
|
488 |
} |
493 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaM.getSourceLocation(),clazz.getName(),mg.getMethod()); |
489 |
|
494 |
|
490 |
// Multiple secondary passes |
495 |
reportMethodCtorWeavingMessage(clazz, mg, decaM); |
491 |
while (!worthRetrying.isEmpty() && modificationOccured) { |
496 |
isChanged = true; |
492 |
modificationOccured = false; |
497 |
modificationOccured = true; |
493 |
// lets have another go |
498 |
} else { |
494 |
List forRemoval = new ArrayList(); |
499 |
if (!decaM.isStarredAnnotationPattern()) |
495 |
for (Iterator iter = worthRetrying.iterator(); iter.hasNext();) { |
500 |
worthRetrying.add(decaM); // an annotation is specified that might be put on by a subsequent decaf |
496 |
DeclareAnnotation decaM = (DeclareAnnotation) iter.next(); |
501 |
} |
497 |
if (decaM.matches(mg.getMemberView(),world)) { |
502 |
} |
498 |
if (doesAlreadyHaveAnnotation(mg.getMemberView(),decaM,reportedProblems)) continue; // skip this one... |
503 |
|
499 |
mg.addAnnotation(decaM.getAnnotationX()); |
504 |
// Multiple secondary passes |
500 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaM.getSourceLocation(),clazz.getName(),mg.getMethod()); |
505 |
while (!worthRetrying.isEmpty() && modificationOccured) { |
501 |
isChanged = true; |
506 |
modificationOccured = false; |
502 |
modificationOccured = true; |
507 |
// lets have another go |
503 |
forRemoval.add(decaM); |
508 |
List forRemoval = new ArrayList(); |
504 |
} |
509 |
for (Iterator iter = worthRetrying.iterator(); iter.hasNext();) { |
505 |
} |
510 |
DeclareAnnotation decaM = (DeclareAnnotation) iter.next(); |
506 |
worthRetrying.removeAll(forRemoval); |
511 |
if (decaM.matches(mg.getMemberView(),world)) { |
507 |
} |
512 |
if (doesAlreadyHaveAnnotation(mg.getMemberView(),decaM,reportedProblems)) continue; // skip this one... |
|
|
513 |
mg.addAnnotation(decaM.getAnnotationX()); |
514 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaM.getSourceLocation(),clazz.getName(),mg.getMethod()); |
515 |
isChanged = true; |
516 |
modificationOccured = true; |
517 |
forRemoval.add(decaM); |
518 |
} |
519 |
} |
520 |
worthRetrying.removeAll(forRemoval); |
521 |
} |
508 |
} |
522 |
} |
509 |
} |
523 |
} |
510 |
} |
524 |
} |
511 |
return isChanged; |
525 |
return isChanged; |
512 |
} |
526 |
} |
513 |
|
527 |
|
Lines 581-588
Link Here
|
581 |
Collection c = clazz.getBcelObjectType().getTypeMungers(); |
595 |
Collection c = clazz.getBcelObjectType().getTypeMungers(); |
582 |
for (Iterator iter = c.iterator();iter.hasNext();) { |
596 |
for (Iterator iter = c.iterator();iter.hasNext();) { |
583 |
BcelTypeMunger typeMunger = (BcelTypeMunger)iter.next(); |
597 |
BcelTypeMunger typeMunger = (BcelTypeMunger)iter.next(); |
584 |
if (typeMunger.getMunger().getKind()==wantedKind) |
598 |
if (typeMunger.getMunger().getKind()==wantedKind) { |
585 |
subset.add(typeMunger); |
599 |
subset.add(typeMunger); |
|
|
600 |
} |
586 |
} |
601 |
} |
587 |
return subset; |
602 |
return subset; |
588 |
} |
603 |
} |
Lines 601-614
Link Here
|
601 |
// FIXME asc refactor this to neaten it up |
616 |
// FIXME asc refactor this to neaten it up |
602 |
public LazyMethodGen locateAnnotationHolderForMethodCtorMunger(LazyClassGen clazz,BcelTypeMunger methodCtorMunger) { |
617 |
public LazyMethodGen locateAnnotationHolderForMethodCtorMunger(LazyClassGen clazz,BcelTypeMunger methodCtorMunger) { |
603 |
if (methodCtorMunger.getMunger() instanceof NewMethodTypeMunger) { |
618 |
if (methodCtorMunger.getMunger() instanceof NewMethodTypeMunger) { |
604 |
NewMethodTypeMunger nftm = (NewMethodTypeMunger)methodCtorMunger.getMunger(); |
619 |
NewMethodTypeMunger nftm = (NewMethodTypeMunger)methodCtorMunger.getMunger(); |
605 |
ResolvedMember lookingFor =AjcMemberMaker.interMethodBody(nftm.getSignature(),methodCtorMunger.getAspectType()); |
620 |
|
606 |
List meths = clazz.getMethodGens(); |
621 |
ResolvedMember lookingFor =AjcMemberMaker.interMethodDispatcher(nftm.getSignature(),methodCtorMunger.getAspectType()); |
607 |
for (Iterator iter = meths.iterator(); iter.hasNext();) { |
622 |
|
608 |
LazyMethodGen element = (LazyMethodGen) iter.next(); |
623 |
List meths = clazz.getMethodGens(); |
609 |
if (element.getName().equals(lookingFor.getName()) && element.getParameterSignature().equals(lookingFor.getParameterSignature())) return element; |
624 |
for (Iterator iter = meths.iterator(); iter.hasNext();) { |
|
|
625 |
LazyMethodGen element = (LazyMethodGen) iter.next(); |
626 |
if (element.getName().equals(lookingFor.getName()) && element.getParameterSignature().equals(lookingFor.getParameterSignature())) return element; |
627 |
} |
628 |
return null; |
629 |
} else if (methodCtorMunger.getMunger() instanceof NewConstructorTypeMunger) { |
630 |
NewConstructorTypeMunger nftm = (NewConstructorTypeMunger)methodCtorMunger.getMunger(); |
631 |
ResolvedMember lookingFor =AjcMemberMaker.postIntroducedConstructor(methodCtorMunger.getAspectType(),nftm.getSignature().getDeclaringType(),nftm.getSignature().getParameterTypes()); |
632 |
List meths = clazz.getMethodGens(); |
633 |
for (Iterator iter = meths.iterator(); iter.hasNext();) { |
634 |
LazyMethodGen element = (LazyMethodGen) iter.next(); |
635 |
if (element.getName().equals(lookingFor.getName()) && element.getParameterSignature().equals(lookingFor.getParameterSignature())) return element; |
636 |
} |
637 |
return null; |
638 |
} else { |
639 |
throw new RuntimeException("Not sure what this is: "+methodCtorMunger); |
610 |
} |
640 |
} |
611 |
return null; |
641 |
} |
|
|
642 |
|
643 |
public LazyMethodGen locateOldAnnotationHolderForMethodCtorMunger(LazyClassGen clazz,BcelTypeMunger methodCtorMunger) { |
644 |
// ajh02: stupid method added. |
645 |
// this method is only needed because it's still looking on the old annotation holder |
646 |
// (the interMethodBody) when doing pointcut matching for annotated methods. |
647 |
if (methodCtorMunger.getMunger() instanceof NewMethodTypeMunger) { |
648 |
NewMethodTypeMunger nftm = (NewMethodTypeMunger)methodCtorMunger.getMunger(); |
649 |
|
650 |
ResolvedMember lookingFor =AjcMemberMaker.interMethodBody(nftm.getSignature(),methodCtorMunger.getAspectType()); |
651 |
|
652 |
List meths = clazz.getMethodGens(); |
653 |
for (Iterator iter = meths.iterator(); iter.hasNext();) { |
654 |
LazyMethodGen element = (LazyMethodGen) iter.next(); |
655 |
if (element.getName().equals(lookingFor.getName()) && element.getParameterSignature().equals(lookingFor.getParameterSignature())) return element; |
656 |
} |
657 |
return null; |
612 |
} else if (methodCtorMunger.getMunger() instanceof NewConstructorTypeMunger) { |
658 |
} else if (methodCtorMunger.getMunger() instanceof NewConstructorTypeMunger) { |
613 |
NewConstructorTypeMunger nftm = (NewConstructorTypeMunger)methodCtorMunger.getMunger(); |
659 |
NewConstructorTypeMunger nftm = (NewConstructorTypeMunger)methodCtorMunger.getMunger(); |
614 |
ResolvedMember lookingFor =AjcMemberMaker.postIntroducedConstructor(methodCtorMunger.getAspectType(),nftm.getSignature().getDeclaringType(),nftm.getSignature().getParameterTypes()); |
660 |
ResolvedMember lookingFor =AjcMemberMaker.postIntroducedConstructor(methodCtorMunger.getAspectType(),nftm.getSignature().getDeclaringType(),nftm.getSignature().getParameterTypes()); |
Lines 694-702
Link Here
|
694 |
|
740 |
|
695 |
if (decaMC.matches(itdIsActually,world)) { |
741 |
if (decaMC.matches(itdIsActually,world)) { |
696 |
LazyMethodGen annotationHolder = locateAnnotationHolderForMethodCtorMunger(clazz,methodctorMunger); |
742 |
LazyMethodGen annotationHolder = locateAnnotationHolderForMethodCtorMunger(clazz,methodctorMunger); |
697 |
if (doesAlreadyHaveAnnotation(annotationHolder,itdIsActually,decaMC,reportedErrors)) continue; // skip this one... |
743 |
if (annotationHolder == null || doesAlreadyHaveAnnotation(annotationHolder,itdIsActually,decaMC,reportedErrors)) continue; // skip this one... |
|
|
744 |
|
698 |
annotationHolder.addAnnotation(decaMC.getAnnotationX()); |
745 |
annotationHolder.addAnnotation(decaMC.getAnnotationX()); |
699 |
itdIsActually.addAnnotation(decaMC.getAnnotationX()); |
746 |
|
|
|
747 |
// ajh02: this is kind of stupid. Because we still need the annotations on the |
748 |
// interMethodBody for pointcut matching to work we have to put them there as |
749 |
// well as on the interMethodDispatch. Really the code should be changed so |
750 |
// that the pointcut matching code looks at the intermethod dispatch |
751 |
// rather than the intermethodbody |
752 |
LazyMethodGen oldAnnotationHolder = locateOldAnnotationHolderForMethodCtorMunger(clazz,methodctorMunger); |
753 |
if (oldAnnotationHolder != null && !oldAnnotationHolder.hasAnnotation(decaMC.getAnnotationTypeX())){ |
754 |
oldAnnotationHolder.addAnnotation(decaMC.getAnnotationX()); |
755 |
} |
756 |
|
700 |
isChanged=true; |
757 |
isChanged=true; |
701 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaMC.getSourceLocation(),itdIsActually.getSourceLocation()); |
758 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaMC.getSourceLocation(),itdIsActually.getSourceLocation()); |
702 |
modificationOccured = true; |
759 |
modificationOccured = true; |
Lines 728-733
Link Here
|
728 |
return isChanged; |
785 |
return isChanged; |
729 |
} |
786 |
} |
730 |
|
787 |
|
|
|
788 |
private boolean dontAddTwice(DeclareAnnotation decaF, Annotation [] dontAddMeTwice){ |
789 |
for (int i = 0; i < dontAddMeTwice.length; i++){ |
790 |
Annotation ann = dontAddMeTwice[i]; |
791 |
if (ann != null && decaF.getAnnotationX().getTypeName().equals(ann.getTypeName())){ |
792 |
dontAddMeTwice[i] = null; // incase it really has been added twice! |
793 |
return true; |
794 |
} |
795 |
} |
796 |
return false; |
797 |
} |
731 |
|
798 |
|
732 |
/** |
799 |
/** |
733 |
* Weave any declare @field statements into the fields of the supplied class |
800 |
* Weave any declare @field statements into the fields of the supplied class |
Lines 753-759
Link Here
|
753 |
List allDecafs = world.getDeclareAnnotationOnFields(); |
820 |
List allDecafs = world.getDeclareAnnotationOnFields(); |
754 |
if (allDecafs.isEmpty()) return false; // nothing to do |
821 |
if (allDecafs.isEmpty()) return false; // nothing to do |
755 |
|
822 |
|
756 |
|
|
|
757 |
boolean isChanged = false; |
823 |
boolean isChanged = false; |
758 |
List itdFields = getITDSubset(clazz,ResolvedTypeMunger.Field); |
824 |
List itdFields = getITDSubset(clazz,ResolvedTypeMunger.Field); |
759 |
if (itdFields!=null) { |
825 |
if (itdFields!=null) { |
Lines 771-786
Link Here
|
771 |
// Single first pass |
837 |
// Single first pass |
772 |
List worthRetrying = new ArrayList(); |
838 |
List worthRetrying = new ArrayList(); |
773 |
boolean modificationOccured = false; |
839 |
boolean modificationOccured = false; |
|
|
840 |
|
841 |
Annotation [] dontAddMeTwice = fields[fieldCounter].getAnnotations(); |
842 |
|
774 |
// go through all the declare @field statements |
843 |
// go through all the declare @field statements |
775 |
for (Iterator iter = decaFs.iterator(); iter.hasNext();) { |
844 |
for (Iterator iter = decaFs.iterator(); iter.hasNext();) { |
776 |
DeclareAnnotation decaF = (DeclareAnnotation) iter.next(); |
845 |
DeclareAnnotation decaF = (DeclareAnnotation) iter.next(); |
777 |
if (decaF.matches(aBcelField,world)) { |
846 |
if (decaF.matches(aBcelField,world)) { |
778 |
if (doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)) continue; // skip this one... |
847 |
|
779 |
aBcelField.addAnnotation(decaF.getAnnotationX()); |
848 |
if (!dontAddTwice(decaF,dontAddMeTwice)){ |
|
|
849 |
if (doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)){ |
850 |
continue; |
851 |
} |
852 |
if(decaF.getAnnotationTypeX().isAnnotationWithRuntimeRetention(world)){ |
853 |
// it should be runtime visible, so put it on the Field |
854 |
Annotation a = decaF.getAnnotationX().getBcelAnnotation(); |
855 |
AnnotationGen ag = new AnnotationGen(a,clazz.getConstantPoolGen(),true); |
856 |
FieldGen myGen = new FieldGen(fields[fieldCounter],clazz.getConstantPoolGen()); |
857 |
myGen.addAnnotation(ag); |
858 |
Field newField = myGen.getField(); |
859 |
|
860 |
aBcelField.addAnnotation(decaF.getAnnotationX()); |
861 |
clazz.replaceField(fields[fieldCounter],newField); |
862 |
fields[fieldCounter]=newField; |
863 |
|
864 |
} else{ |
865 |
aBcelField.addAnnotation(decaF.getAnnotationX()); |
866 |
} |
867 |
} |
868 |
|
780 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),clazz.getName(),fields[fieldCounter]); |
869 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),clazz.getName(),fields[fieldCounter]); |
781 |
reportFieldAnnotationWeavingMessage(clazz, fields, fieldCounter, decaF); |
870 |
reportFieldAnnotationWeavingMessage(clazz, fields, fieldCounter, decaF); |
782 |
isChanged = true; |
871 |
isChanged = true; |
783 |
modificationOccured = true; |
872 |
modificationOccured = true; |
|
|
873 |
|
784 |
} else { |
874 |
} else { |
785 |
if (!decaF.isStarredAnnotationPattern()) |
875 |
if (!decaF.isStarredAnnotationPattern()) |
786 |
worthRetrying.add(decaF); // an annotation is specified that might be put on by a subsequent decaf |
876 |
worthRetrying.add(decaF); // an annotation is specified that might be put on by a subsequent decaf |
Lines 795-800
Link Here
|
795 |
for (Iterator iter = worthRetrying.iterator(); iter.hasNext();) { |
885 |
for (Iterator iter = worthRetrying.iterator(); iter.hasNext();) { |
796 |
DeclareAnnotation decaF = (DeclareAnnotation) iter.next(); |
886 |
DeclareAnnotation decaF = (DeclareAnnotation) iter.next(); |
797 |
if (decaF.matches(aBcelField,world)) { |
887 |
if (decaF.matches(aBcelField,world)) { |
|
|
888 |
// below code is for recursive things |
798 |
if (doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)) continue; // skip this one... |
889 |
if (doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)) continue; // skip this one... |
799 |
aBcelField.addAnnotation(decaF.getAnnotationX()); |
890 |
aBcelField.addAnnotation(decaF.getAnnotationX()); |
800 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),clazz.getName(),fields[fieldCounter]); |
891 |
AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),clazz.getName(),fields[fieldCounter]); |
Lines 848-854
Link Here
|
848 |
} |
939 |
} |
849 |
|
940 |
|
850 |
private boolean doesAlreadyHaveAnnotation(LazyMethodGen rm,ResolvedMember itdfieldsig,DeclareAnnotation deca,List reportedProblems) { |
941 |
private boolean doesAlreadyHaveAnnotation(LazyMethodGen rm,ResolvedMember itdfieldsig,DeclareAnnotation deca,List reportedProblems) { |
851 |
if (rm.hasAnnotation(deca.getAnnotationTypeX())) { |
942 |
if (rm != null && rm.hasAnnotation(deca.getAnnotationTypeX())) { |
852 |
if (world.getLint().elementAlreadyAnnotated.isEnabled()) { |
943 |
if (world.getLint().elementAlreadyAnnotated.isEnabled()) { |
853 |
Integer uniqueID = new Integer(rm.hashCode()*deca.hashCode()); |
944 |
Integer uniqueID = new Integer(rm.hashCode()*deca.hashCode()); |
854 |
if (!reportedProblems.contains(uniqueID)) { |
945 |
if (!reportedProblems.contains(uniqueID)) { |
Lines 1263-1268
Link Here
|
1263 |
// ---- |
1354 |
// ---- |
1264 |
|
1355 |
|
1265 |
private boolean match(LazyMethodGen mg) { |
1356 |
private boolean match(LazyMethodGen mg) { |
|
|
1357 |
|
1266 |
BcelShadow enclosingShadow; |
1358 |
BcelShadow enclosingShadow; |
1267 |
|
1359 |
|
1268 |
List shadowAccumulator = new ArrayList(); |
1360 |
List shadowAccumulator = new ArrayList(); |
Lines 1287-1293
Link Here
|
1287 |
// Annotations for things with effective signatures are never stored in the effective |
1379 |
// Annotations for things with effective signatures are never stored in the effective |
1288 |
// signature itself - we have to hunt for them. Storing them in the effective signature |
1380 |
// signature itself - we have to hunt for them. Storing them in the effective signature |
1289 |
// would mean keeping two sets up to date (no way!!) |
1381 |
// would mean keeping two sets up to date (no way!!) |
1290 |
|
1382 |
|
1291 |
fixAnnotationsForResolvedMember(rm,mg.getMemberView()); |
1383 |
fixAnnotationsForResolvedMember(rm,mg.getMemberView()); |
1292 |
|
1384 |
|
1293 |
enclosingShadow = |
1385 |
enclosingShadow = |
Lines 1594-1600
Link Here
|
1594 |
ResolvedMember resolvedDooberry = world.resolve(declaredSig); |
1686 |
ResolvedMember resolvedDooberry = world.resolve(declaredSig); |
1595 |
annotations = resolvedDooberry.getAnnotationTypes(); |
1687 |
annotations = resolvedDooberry.getAnnotationTypes(); |
1596 |
} else { |
1688 |
} else { |
1597 |
ResolvedMember realthing = AjcMemberMaker.interMethodBody(rm,memberHostType); |
1689 |
ResolvedMember realthing = AjcMemberMaker.interMethodDispatcher(rm,memberHostType); // |
1598 |
ResolvedMember resolvedDooberry = world.resolve(realthing); |
1690 |
ResolvedMember resolvedDooberry = world.resolve(realthing); |
1599 |
annotations = resolvedDooberry.getAnnotationTypes(); |
1691 |
annotations = resolvedDooberry.getAnnotationTypes(); |
1600 |
} |
1692 |
} |