Relation relation; if (shadow.getKind().equals(Shadow.FieldGet) || shadow.getKind().equals(Shadow.FieldSet)) { relation = AdviceAssociation.FIELD_ACCESS_RELATION; } else if (shadow.getKind().equals(Shadow.Initialization) || shadow.getKind().equals(Shadow.StaticInitialization)) { relation = AdviceAssociation.INITIALIZER_RELATION; } else if (shadow.getKind().equals(Shadow.ExceptionHandler)) { relation = AdviceAssociation.HANDLER_RELATION; } else if (shadow.getKind().equals(Shadow.MethodCall)) { relation = AdviceAssociation.METHOD_CALL_SITE_RELATION; } else if (shadow.getKind().equals(Shadow.ConstructorCall)) { relation = AdviceAssociation.CONSTRUCTOR_CALL_SITE_RELATION; } else if (shadow.getKind().equals(Shadow.MethodExecution) || shadow.getKind().equals(Shadow.AdviceExecution)) { relation = AdviceAssociation.METHOD_RELATION; } else if (shadow.getKind().equals(Shadow.ConstructorExecution)) { relation = AdviceAssociation.CONSTRUCTOR_RELATION; } else if (shadow.getKind().equals(Shadow.PreInitialization)) {  relation = AdviceAssociation.INITIALIZER_RELATION; } else { System.err.println("> unmatched relation: " + shadow.getKind()); relation = AdviceAssociation.METHOD_RELATION; }
IRelationship relation = null;
	public static void noteMunger(StructureModel model, Shadow shadow, ShadowMunger munger) {		if (munger instanceof Advice) {			Advice a = (Advice)munger;			if (a.getKind().isPerEntry() || a.getKind().isCflow()) {				// ??? might want to show these in the future				return;			}//			System.out.println("--------------------------");			ProgramElementNode targetNode = getNode(model, shadow);			ProgramElementNode adviceNode = getNode(model, a);  						Relation relation;			if (shadow.getKind().equals(Shadow.FieldGet) || shadow.getKind().equals(Shadow.FieldSet)) {				relation = AdviceAssociation.FIELD_ACCESS_RELATION;			} else if (shadow.getKind().equals(Shadow.Initialization) || shadow.getKind().equals(Shadow.StaticInitialization)) {				relation = AdviceAssociation.INITIALIZER_RELATION;			} else if (shadow.getKind().equals(Shadow.ExceptionHandler)) {				relation = AdviceAssociation.HANDLER_RELATION;			} else if (shadow.getKind().equals(Shadow.MethodCall)) {				relation = AdviceAssociation.METHOD_CALL_SITE_RELATION;			} else if (shadow.getKind().equals(Shadow.ConstructorCall)) {				relation = AdviceAssociation.CONSTRUCTOR_CALL_SITE_RELATION;			} else if (shadow.getKind().equals(Shadow.MethodExecution) || shadow.getKind().equals(Shadow.AdviceExecution)) {				relation = AdviceAssociation.METHOD_RELATION;			} else if (shadow.getKind().equals(Shadow.ConstructorExecution)) {				relation = AdviceAssociation.CONSTRUCTOR_RELATION;			} else if (shadow.getKind().equals(Shadow.PreInitialization)) {				// TODO: someone should check that this behaves reasonably in the IDEs				relation = AdviceAssociation.INITIALIZER_RELATION;			} else {				System.err.println("> unmatched relation: " + shadow.getKind());				relation = AdviceAssociation.METHOD_RELATION;			}			//			System.out.println("> target: " + targetNode + ", advice: " + adviceNode);			createAppropriateLinks(targetNode, adviceNode, relation);		}	}