View | Details | Raw Unified | Return to bug 98901 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/aspectj/weaver/AjcMemberMaker.java (-5 / +3 lines)
Lines 602-609 Link Here
602
	
602
	
603
603
604
	/**
604
	/**
605
	 * This method goes on the target type of the inter-type method. (and possibly the topmost-implemeters,
605
	 * This method goes on the target type.
606
	 * if the target type is an interface) 
606
	 * It jumps to the interMethodBody on the aspect.
607
	 */
607
	 */
608
	public static ResolvedMember interMethod(ResolvedMember meth, TypeX aspectType, boolean onInterface) 
608
	public static ResolvedMember interMethod(ResolvedMember meth, TypeX aspectType, boolean onInterface) 
609
	{
609
	{
Lines 637-642 Link Here
637
637
638
	/**
638
	/**
639
	 * This static method goes on the declaring aspect of the inter-type method.
639
	 * This static method goes on the declaring aspect of the inter-type method.
640
	 * It contains the method body.
640
	 */
641
	 */
641
	public static ResolvedMember interMethodBody(ResolvedMember meth, TypeX aspectType) 
642
	public static ResolvedMember interMethodBody(ResolvedMember meth, TypeX aspectType) 
642
	{
643
	{
Lines 650-664 Link Here
650
			modifiers |= Modifier.STRICT;
651
			modifiers |= Modifier.STRICT;
651
		}
652
		}
652
		
653
		
653
		
654
		return new ResolvedMember(Member.METHOD, aspectType, modifiers,
654
		return new ResolvedMember(Member.METHOD, aspectType, modifiers,
655
			meth.getReturnType(), 
655
			meth.getReturnType(), 
656
			NameMangler.interMethodBody(aspectType, meth.getDeclaringType(), meth.getName()),
656
			NameMangler.interMethodBody(aspectType, meth.getDeclaringType(), meth.getName()),
657
			paramTypes, meth.getExceptions());
657
			paramTypes, meth.getExceptions());
658
	}
658
	}
659
	
659
	
660
	
661
	
662
660
663
	private static ResolvedMember addCookieTo(ResolvedMember ret, TypeX aspectType) {
661
	private static ResolvedMember addCookieTo(ResolvedMember ret, TypeX aspectType) {
664
		TypeX[] params = ret.getParameterTypes();
662
		TypeX[] params = ret.getParameterTypes();
(-)src/org/aspectj/weaver/NewConstructorTypeMunger.java (-2 / +1 lines)
Lines 38-45 Link Here
38
38
39
	}
39
	}
40
	
40
	
41
	//XXX horrible name clash here
41
	public ResolvedMember getInterMethodBody(TypeX aspectType) {
42
	public ResolvedMember getDispatchMethod(TypeX aspectType) {
43
		return AjcMemberMaker.interMethodBody(signature, aspectType);
42
		return AjcMemberMaker.interMethodBody(signature, aspectType);
44
	}
43
	}
45
44
(-)src/org/aspectj/weaver/NewMethodTypeMunger.java (-2 / +1 lines)
Lines 28-35 Link Here
28
28
29
	}
29
	}
30
	
30
	
31
	//XXX horrible name clash here
31
	public ResolvedMember getInterMethodBody(TypeX aspectType) {
32
	public ResolvedMember getDispatchMethod(TypeX aspectType) {
33
		return AjcMemberMaker.interMethodBody(signature, aspectType);
32
		return AjcMemberMaker.interMethodBody(signature, aspectType);
34
	}
33
	}
35
34
(-)src/org/aspectj/weaver/bcel/BcelClassWeaver.java (-5 / +55 lines)
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 581-588 Link Here
581
		Collection c = clazz.getBcelObjectType().getTypeMungers();
584
		Collection c = clazz.getBcelObjectType().getTypeMungers();
582
		for (Iterator iter = c.iterator();iter.hasNext();) {
585
		for (Iterator iter = c.iterator();iter.hasNext();) {
583
			BcelTypeMunger typeMunger = (BcelTypeMunger)iter.next();
586
			BcelTypeMunger typeMunger = (BcelTypeMunger)iter.next();
584
			if (typeMunger.getMunger().getKind()==wantedKind) 
587
			if (typeMunger.getMunger().getKind()==wantedKind) {
585
				subset.add(typeMunger);
588
				subset.add(typeMunger);
589
			}
586
		}
590
		}
587
		return subset;
591
		return subset;
588
	}
592
	}
Lines 728-733 Link Here
728
	      return isChanged;
732
	      return isChanged;
729
	}
733
	}
730
	
734
	
735
	private boolean dontAddTwice(DeclareAnnotation decaF, Annotation [] dontAddMeTwice){
736
		// ajh02: method added
737
		for (int i = 0; i < dontAddMeTwice.length; i++){
738
			Annotation ann = dontAddMeTwice[i];
739
			//System.err.println(decaF.getAnnotationX().getTypeName() + " =? " + ann.getTypeName());
740
			if (ann != null && decaF.getAnnotationX().getTypeName().equals(ann.getTypeName())){
741
				dontAddMeTwice[i] = null; // incase it really has been added twice!
742
				return true;
743
			}
744
		}
745
		return false;
746
	}
731
	
747
	
732
	/**
748
	/**
733
	 * Weave any declare @field statements into the fields of the supplied class
749
	 * Weave any declare @field statements into the fields of the supplied class
Lines 753-759 Link Here
753
		List allDecafs = world.getDeclareAnnotationOnFields();
769
		List allDecafs = world.getDeclareAnnotationOnFields();
754
		if (allDecafs.isEmpty()) return false; // nothing to do
770
		if (allDecafs.isEmpty()) return false; // nothing to do
755
		
771
		
756
		
757
		boolean isChanged = false;
772
		boolean isChanged = false;
758
		List itdFields = getITDSubset(clazz,ResolvedTypeMunger.Field);
773
		List itdFields = getITDSubset(clazz,ResolvedTypeMunger.Field);
759
		if (itdFields!=null) {
774
		if (itdFields!=null) {
Lines 771-786 Link Here
771
            // Single first pass
786
            // Single first pass
772
            List worthRetrying = new ArrayList();
787
            List worthRetrying = new ArrayList();
773
            boolean modificationOccured = false;
788
            boolean modificationOccured = false;
789
            
790
            Annotation [] dontAddMeTwice = fields[fieldCounter].getAnnotations();
791
            
774
            // go through all the declare @field statements
792
            // go through all the declare @field statements
775
            for (Iterator iter = decaFs.iterator(); iter.hasNext();) {
793
            for (Iterator iter = decaFs.iterator(); iter.hasNext();) {
776
				DeclareAnnotation decaF = (DeclareAnnotation) iter.next();
794
				DeclareAnnotation decaF = (DeclareAnnotation) iter.next();
777
				if (decaF.matches(aBcelField,world)) {
795
				if (decaF.matches(aBcelField,world)) {
778
					if (doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)) continue; // skip this one...
796
					
779
					aBcelField.addAnnotation(decaF.getAnnotationX());
797
					boolean decaFisITD = dontAddTwice(decaF,dontAddMeTwice);
798
					
799
					if (!decaFisITD && doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)){
800
						continue;
801
					}
802
					
803
					if (!decaFisITD){
804
					if(decaF.getAnnotationTypeX().isAnnotationWithRuntimeRetention(world)){						
805
						// it should be runtime visible, so put it on the Field
806
						Annotation a = decaF.getAnnotationX().getBcelAnnotation();
807
						AnnotationGen ag = new AnnotationGen(a,clazz.getConstantPoolGen(),true);
808
						FieldGen myGen = new FieldGen(fields[fieldCounter],clazz.getConstantPoolGen());
809
						myGen.addAnnotation(ag);
810
						Field newField = myGen.getField();
811
812
						aBcelField.addAnnotation(decaF.getAnnotationX());
813
					    clazz.replaceField(fields[fieldCounter],newField);
814
					    fields[fieldCounter]=newField;
815
						
816
					} else{
817
						aBcelField.addAnnotation(decaF.getAnnotationX());
818
					}
819
					} else { // it was an itd
820
						if(decaF.getAnnotationTypeX().isAnnotationWithRuntimeRetention(world)){
821
						} else{
822
							// not sure what it should do here
823
							aBcelField.addAnnotation(decaF.getAnnotationX());
824
						}
825
					}
826
					
780
					AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),clazz.getName(),fields[fieldCounter]);
827
					AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),clazz.getName(),fields[fieldCounter]);
781
					reportFieldAnnotationWeavingMessage(clazz, fields, fieldCounter, decaF);		
828
					reportFieldAnnotationWeavingMessage(clazz, fields, fieldCounter, decaF);		
782
					isChanged = true;
829
					isChanged = true;
783
					modificationOccured = true;
830
					modificationOccured = true;
831
					
784
				} else {
832
				} else {
785
					if (!decaF.isStarredAnnotationPattern()) 
833
					if (!decaF.isStarredAnnotationPattern()) 
786
						worthRetrying.add(decaF); // an annotation is specified that might be put on by a subsequent decaf
834
						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();) {
843
              for (Iterator iter = worthRetrying.iterator(); iter.hasNext();) {
796
				DeclareAnnotation decaF = (DeclareAnnotation) iter.next();
844
				DeclareAnnotation decaF = (DeclareAnnotation) iter.next();
797
				if (decaF.matches(aBcelField,world)) {
845
				if (decaF.matches(aBcelField,world)) {
846
					// below code is for recursive things
798
					if (doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)) continue; // skip this one...
847
					if (doesAlreadyHaveAnnotation(aBcelField,decaF,reportedProblems)) continue; // skip this one...
799
					aBcelField.addAnnotation(decaF.getAnnotationX());
848
					aBcelField.addAnnotation(decaF.getAnnotationX());
800
					AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),clazz.getName(),fields[fieldCounter]);
849
					AsmRelationshipProvider.getDefault().addDeclareAnnotationRelationship(decaF.getSourceLocation(),clazz.getName(),fields[fieldCounter]);
Lines 1263-1268 Link Here
1263
	// ----
1312
	// ----
1264
	
1313
	
1265
	private boolean match(LazyMethodGen mg) {
1314
	private boolean match(LazyMethodGen mg) {
1315
		
1266
		BcelShadow enclosingShadow;
1316
		BcelShadow enclosingShadow;
1267
1317
1268
		List shadowAccumulator = new ArrayList();
1318
		List shadowAccumulator = new ArrayList();
Lines 1287-1293 Link Here
1287
				  // Annotations for things with effective signatures are never stored in the effective 
1337
				  // 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
1338
				  // 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!!)
1339
				  // would mean keeping two sets up to date (no way!!)
1290
				  
1340
                  
1291
				  fixAnnotationsForResolvedMember(rm,mg.getMemberView());
1341
				  fixAnnotationsForResolvedMember(rm,mg.getMemberView());
1292
				  				  
1342
				  				  
1293
				  enclosingShadow =
1343
				  enclosingShadow =
(-)src/org/aspectj/weaver/bcel/BcelTypeMunger.java (-17 / +47 lines)
Lines 57-63 Link Here
57
import org.aspectj.weaver.WeaverStateInfo;
57
import org.aspectj.weaver.WeaverStateInfo;
58
import org.aspectj.weaver.patterns.Pointcut;
58
import org.aspectj.weaver.patterns.Pointcut;
59
59
60
61
//XXX addLazyMethodGen is probably bad everywhere
60
//XXX addLazyMethodGen is probably bad everywhere
62
public class BcelTypeMunger extends ConcreteTypeMunger {
61
public class BcelTypeMunger extends ConcreteTypeMunger {
63
62
Lines 707-713 Link Here
707
	
706
	
708
	private boolean mungeNewMethod(BcelClassWeaver weaver, NewMethodTypeMunger munger) {
707
	private boolean mungeNewMethod(BcelClassWeaver weaver, NewMethodTypeMunger munger) {
709
		ResolvedMember signature = munger.getSignature();
708
		ResolvedMember signature = munger.getSignature();
710
		ResolvedMember dispatchMethod = munger.getDispatchMethod(aspectType);
709
		ResolvedMember interMethodBody = munger.getInterMethodBody(aspectType);
711
710
712
		LazyClassGen gen = weaver.getLazyClassGen();
711
		LazyClassGen gen = weaver.getLazyClassGen();
713
		
712
		
Lines 725-745 Link Here
725
		}
724
		}
726
		
725
		
727
		if (onType.equals(gen.getType())) {
726
		if (onType.equals(gen.getType())) {
728
			ResolvedMember introMethod = 
727
			ResolvedMember interMethod = 
729
					AjcMemberMaker.interMethod(signature, aspectType, onInterface);
728
					AjcMemberMaker.interMethod(signature, aspectType, onInterface);
730
            
729
            
731
			AnnotationX annotationsOnRealMember[] = null;
730
			AnnotationX annotationsOnRealMember[] = null;
732
			// pr98901
731
			// pr98901
733
		    // For copying the annotations across, we have to discover the real member in the aspect
732
		    // For copying the annotations across, we have to discover the real member in the aspect
734
		    // which is holding them.
733
		    // which is holding them.
735
			if (weaver.getWorld().behaveInJava5Way && !onInterface && munger.getSignature().isPublic() && !munger.getSignature().isAbstract()) {
734
			if (weaver.getWorld().behaveInJava5Way && munger.getSignature().isPublic()
736
				ResolvedMember realMember = getRealMemberForITDFromAspect(aspectType,dispatchMethod);
735
					){
737
				if (realMember==null) throw new BCException("Couldn't find ITD holder member '"+
736
					// the below line just gets the method with the same name in aspectType.getDeclaredMethods();
738
						                                    dispatchMethod+"' on aspect "+aspectType);
737
					ResolvedMember realMember = getRealMemberForITDFromAspect(aspectType,interMethodBody);
739
				annotationsOnRealMember = realMember.getAnnotations();
738
					if (realMember==null) throw new BCException("Couldn't find ITD holder member '"+
739
							interMethodBody+"' on aspect "+aspectType);
740
					annotationsOnRealMember = realMember.getAnnotations();
741
					if (annotationsOnRealMember.length > 0)
742
						System.err.println(annotationsOnRealMember[0].getTypeName());
743
					
740
			}
744
			}
741
745
742
			LazyMethodGen mg = makeMethodGen(gen, introMethod);
746
			LazyMethodGen mg = makeMethodGen(gen, interMethod);
743
			
747
			
744
			if (annotationsOnRealMember!=null) {
748
			if (annotationsOnRealMember!=null) {
745
				for (int i = 0; i < annotationsOnRealMember.length; i++) {
749
				for (int i = 0; i < annotationsOnRealMember.length; i++) {
Lines 750-756 Link Here
750
				}
754
				}
751
			}
755
			}
752
756
753
			if (!onInterface && !Modifier.isAbstract(introMethod.getModifiers())) {
757
			if (!onInterface && !Modifier.isAbstract(interMethod.getModifiers())) {
754
				InstructionList body = mg.getBody();
758
				InstructionList body = mg.getBody();
755
				InstructionFactory fact = gen.getFactory();
759
				InstructionFactory fact = gen.getFactory();
756
				int pos = 0;
760
				int pos = 0;
Lines 759-774 Link Here
759
					body.append(InstructionFactory.createThis());
763
					body.append(InstructionFactory.createThis());
760
					pos++;
764
					pos++;
761
				}
765
				}
762
				Type[] paramTypes = BcelWorld.makeBcelTypes(introMethod.getParameterTypes());
766
				Type[] paramTypes = BcelWorld.makeBcelTypes(interMethod.getParameterTypes());
763
				for (int i = 0, len = paramTypes.length; i < len; i++) {
767
				for (int i = 0, len = paramTypes.length; i < len; i++) {
764
					Type paramType = paramTypes[i];
768
					Type paramType = paramTypes[i];
765
					body.append(InstructionFactory.createLoad(paramType, pos));
769
					body.append(InstructionFactory.createLoad(paramType, pos));
766
					pos+=paramType.getSize();
770
					pos+=paramType.getSize();
767
				}
771
				}
768
				body.append(Utility.createInvoke(fact, weaver.getWorld(), dispatchMethod));
772
				body.append(Utility.createInvoke(fact, weaver.getWorld(), interMethodBody));
769
				body.append(
773
				body.append(
770
					InstructionFactory.createReturn(
774
					InstructionFactory.createReturn(
771
						BcelWorld.makeBcelType(introMethod.getReturnType())));
775
						BcelWorld.makeBcelType(interMethod.getReturnType())));
772
			} else {
776
			} else {
773
				//??? this is okay
777
				//??? this is okay
774
				//if (!(mg.getBody() == null)) throw new RuntimeException("bas");
778
				//if (!(mg.getBody() == null)) throw new RuntimeException("bas");
Lines 824-830 Link Here
824
				body.append(InstructionFactory.createLoad(paramType, pos));
828
				body.append(InstructionFactory.createLoad(paramType, pos));
825
				pos+=paramType.getSize();
829
				pos+=paramType.getSize();
826
			  }
830
			  }
827
			  body.append(Utility.createInvoke(fact, weaver.getWorld(), dispatchMethod));
831
			  body.append(Utility.createInvoke(fact, weaver.getWorld(), interMethodBody));
828
			  body.append(InstructionFactory.createReturn(returnType));
832
			  body.append(InstructionFactory.createReturn(returnType));
829
			  mg.definingType = onType;
833
			  mg.definingType = onType;
830
			
834
			
Lines 1039-1046 Link Here
1039
		/*ResolvedMember initMethod = */munger.getInitMethod(aspectType);
1043
		/*ResolvedMember initMethod = */munger.getInitMethod(aspectType);
1040
		
1044
		
1041
		LazyClassGen gen = weaver.getLazyClassGen();
1045
		LazyClassGen gen = weaver.getLazyClassGen();
1042
		ResolvedMember field = munger.getSignature();
1046
		ResolvedMember field = munger.getSignature();	
1043
		
1044
		
1047
		
1045
		ResolvedTypeX onType = weaver.getWorld().resolve(field.getDeclaringType(),munger.getSourceLocation());
1048
		ResolvedTypeX onType = weaver.getWorld().resolve(field.getDeclaringType(),munger.getSourceLocation());
1046
		boolean onInterface = onType.isInterface();
1049
		boolean onInterface = onType.isInterface();
Lines 1055-1060 Link Here
1055
			return false;
1058
			return false;
1056
		}
1059
		}
1057
		
1060
		
1061
		
1062
		ResolvedMember interMethodBody = munger.getInitMethod(aspectType); // ajh02: rename
1063
		
1064
		AnnotationX annotationsOnRealMember[] = null;
1065
		// pr98901
1066
	    // For copying the annotations across, we have to discover the real member in the aspect
1067
	    // which is holding them.
1068
		if (weaver.getWorld().behaveInJava5Way && munger.getSignature().isPublic()){
1069
				// the below line just gets the method with the same name in aspectType.getDeclaredMethods();
1070
				ResolvedMember realMember = getRealMemberForITDFromAspect(aspectType,interMethodBody);
1071
				if (realMember==null) throw new BCException("Couldn't find ITD init member '"+
1072
						interMethodBody+"' on aspect "+aspectType);
1073
				annotationsOnRealMember = realMember.getAnnotations();
1074
				// ajh02: could a fix for pr99191 go around here too?
1075
		}
1076
		
1058
		if (onType.equals(gen.getType())) {
1077
		if (onType.equals(gen.getType())) {
1059
			if (onInterface) {
1078
			if (onInterface) {
1060
				LazyMethodGen mg = makeMethodGen(gen, 
1079
				LazyMethodGen mg = makeMethodGen(gen, 
Lines 1068-1074 Link Here
1068
				weaver.addInitializer(this);
1087
				weaver.addInitializer(this);
1069
				FieldGen fg = makeFieldGen(gen,
1088
				FieldGen fg = makeFieldGen(gen,
1070
					AjcMemberMaker.interFieldClassField(field, aspectType));
1089
					AjcMemberMaker.interFieldClassField(field, aspectType));
1071
	    		gen.addField(fg.getField(),getSourceLocation());
1090
				
1091
				if (annotationsOnRealMember!=null) {
1092
					for (int i = 0; i < annotationsOnRealMember.length; i++) {
1093
						AnnotationX annotationX = annotationsOnRealMember[i];
1094
						Annotation a = annotationX.getBcelAnnotation();
1095
						AnnotationGen ag = new AnnotationGen(a,weaver.getLazyClassGen().getConstantPoolGen(),true);	
1096
						fg.addAnnotation(ag);
1097
					}
1098
				}
1099
				
1100
				gen.addField(fg.getField(),getSourceLocation());
1101
	    		
1072
			}
1102
			}
1073
    		return true;
1103
    		return true;
1074
		} else if (onInterface && gen.getType().isTopmostImplementor(onType)) {
1104
		} else if (onInterface && gen.getType().isTopmostImplementor(onType)) {
(-)src/org/aspectj/weaver/bcel/LazyClassGen.java (+8 lines)
Lines 439-445 Link Here
439
            LazyMethodGen gen = (LazyMethodGen) methodGens.get(i);
439
            LazyMethodGen gen = (LazyMethodGen) methodGens.get(i);
440
            // we skip empty clinits
440
            // we skip empty clinits
441
            if (isEmptyClinit(gen)) continue;
441
            if (isEmptyClinit(gen)) continue;
442
            try{
442
            myGen.addMethod(gen.getMethod());
443
            myGen.addMethod(gen.getMethod());
444
            } catch (Exception e){} // ajh02: UGH!!! to catch a npe, must do better!
443
        }
445
        }
444
		if (inlinedFiles.size() != 0) {
446
		if (inlinedFiles.size() != 0) {
445
			if (hasSourceDebugExtensionAttribute(myGen)) {
447
			if (hasSourceDebugExtensionAttribute(myGen)) {
Lines 886-891 Link Here
886
		myGen.addField(field);
888
		myGen.addField(field);
887
	}
889
	}
888
	
890
	
891
	public void replaceField(Field oldF, Field newF){
892
//		 ajh02: method added
893
		myGen.removeField(oldF);
894
		myGen.addField(newF);
895
	}
896
	
889
	public void addField(Field field, ISourceLocation sourceLocation) {
897
	public void addField(Field field, ISourceLocation sourceLocation) {
890
		addField(field);
898
		addField(field);
891
		if (!(field.isPrivate() 
899
		if (!(field.isPrivate() 

Return to bug 98901