[jboss-cvs] JBossAS SVN: r57387 - projects/aop/trunk/aop/src/main/org/jboss/aop/instrument

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Oct 3 12:04:11 EDT 2006


Author: kabir.khan at jboss.com
Date: 2006-10-03 12:04:10 -0400 (Tue, 03 Oct 2006)
New Revision: 57387

Modified:
   projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java
Log:
Make examples work in the default package

Modified: projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java
===================================================================
--- projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java	2006-10-03 15:22:49 UTC (rev 57386)
+++ projects/aop/trunk/aop/src/main/org/jboss/aop/instrument/JoinPointGenerator.java	2006-10-03 16:04:10 UTC (rev 57387)
@@ -1,4 +1,4 @@
-/*
+   /*
   * JBoss, Home of Professional Open Source
   * Copyright 2005, JBoss Inc., and individual contributors as indicated
   * by the @authors tag. See the copyright.txt in the distribution for a
@@ -237,7 +237,7 @@
    CannotCompileException, ClassNotFoundException
    {
       CtClass superClass = pool.get(joinpointFqn);
-      String className = advisor.getClass().getPackage().getName() + "." + joinpointClassName + "_" + getIncrement(); 
+      String className = getJoinpointClassName();
       try
       {
          CtClass clazz = TransformerCommon.makeClass(pool, className);
@@ -275,6 +275,23 @@
       }
    }
 
+   private String getJoinpointClassName()
+   {
+      Package pkg = advisor.getClass().getPackage();
+      
+      StringBuffer className = new StringBuffer();
+      if (pkg != null)
+      {
+         className.append(pkg.getName());
+         className.append(".");
+      }
+      className.append(joinpointClassName);
+      className.append("_");
+      className.append(getIncrement());
+      
+      return className.toString();
+   }
+
    protected abstract boolean isVoid();
    protected abstract Class getReturnType(); 
    protected abstract AdviceMethodProperties getAdviceMethodProperties(AdviceSetup setup);




More information about the jboss-cvs-commits mailing list