summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-09-07 00:03:24 +0000
committerwisberg <wisberg>2003-09-07 00:03:24 +0000
commitded6e7a9ac8c13f10f7566250ec544324936bb83 (patch)
treea3db413b40055ea5a5f979e9be06ba65f11ce9da
parent46cdb99dd697902f822082abbe14234638635a90 (diff)
downloadaspectj-ded6e7a9ac8c13f10f7566250ec544324936bb83.tar.gz
aspectj-ded6e7a9ac8c13f10f7566250ec544324936bb83.zip
JoinPointCollector.java was moved to sandbox api-clients, and in any case has not been updated for the new asm API's.
-rw-r--r--docs/samples/extensions/JoinPointCollector.java67
1 files changed, 0 insertions, 67 deletions
diff --git a/docs/samples/extensions/JoinPointCollector.java b/docs/samples/extensions/JoinPointCollector.java
deleted file mode 100644
index 44065c437..000000000
--- a/docs/samples/extensions/JoinPointCollector.java
+++ /dev/null
@@ -1,67 +0,0 @@
-
-package org.aspectj.samples;
-
-import java.util.*;
-import org.aspectj.tools.ajc.Main;
-
-
-import org.aspectj.asm.*;
-
-/**
- * Collects join point information for all advised methods and constructors. Prints results
- * to
- *
- * @author Mik Kersten
- */
-public class JoinPointCollector extends Main {
-
- /**
- *
- * @param args
- */
- public static void main(String[] args) {
- String[] newArgs = new String[args.length +1];
- newArgs[0] = "-emacssym";
- for (int i = 0; i < args.length; i++) {
- newArgs[i+1] = args[i];
- }
- new JoinPointCollector().runMain(newArgs, false);
- }
-
- public void runMain(String[] args, boolean useSystemExit) {
- super.runMain(args, useSystemExit);
-
- ModelWalker walker = new ModelWalker() {
- public void preProcess(StructureNode node) {
- ProgramElementNode p = (ProgramElementNode)node;
-
- // first check if it is a method or constructor
- if (p.getProgramElementKind().equals(ProgramElementNode.Kind.METHOD)) {
-
- // now check if it is advsied
- for (Iterator it = p.getRelations().iterator(); it.hasNext(); ) {
-
- RelationNode relationNode = (RelationNode)it.next();
- Relation relation = relationNode.getRelation();
- if (relation == AdviceAssociation.METHOD_RELATION) {
- System.out.println("method: " + p.toString() + ", advised by: " + relationNode.getChildren());
- }
- }
- }
-
- // code around the fact that constructor advice relationship is on the type
- if (p.getProgramElementKind().equals(ProgramElementNode.Kind.CONSTRUCTOR)) {
- for (Iterator it = ((ProgramElementNode)p.getParent()).getRelations().iterator(); it.hasNext(); ) {
- RelationNode relationNode = (RelationNode)it.next();
- Relation relation = relationNode.getRelation();
- if (relation == AdviceAssociation.CONSTRUCTOR_RELATION) {
- System.out.println("constructor: " + p.toString() + ", advised by: " + relationNode.getChildren());
- }
- }
- }
- }
- };
-
- StructureModelManager.getDefault().getStructureModel().getRoot().walk(walker);
- }
-}