From: Kabir K. <kk...@jb...> - 2006-03-01 22:44:30
|
User: kkhan Date: 06/03/01 17:44:27 Added: src/main/org/jboss/aop JRockitClassAdvisor.java Log: Initial commit of files for the jrockit/aop integration so Staale has something to work from Revision Changes Path 1.1 date: 2006/03/01 22:44:27; author: kkhan; state: Exp;jrockit-aop/src/main/org/jboss/aop/JRockitClassAdvisor.java Index: JRockitClassAdvisor.java =================================================================== /* * 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 * full listing of individual contributors. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as * published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA, or see the FSF site: http://www.fsf.org. */ package org.jboss.aop; import jrockit.ext.weaving.Weaver; import jrockit.ext.weaving.WeaverFactory; import org.jboss.aop.AspectManager; import org.jboss.aop.ClassAdvisor; import org.jboss.aop.JoinPoint; import org.jboss.aop.advice.AdviceBinding; import org.jboss.aop.instrument.ConstructorAction; import org.jboss.aop.instrument.MethodAction; import org.jboss.aop.joinpoint.Joinpoint; /** * * @author <a href="kab...@jb...">Kabir Khan</a> * @version $Revision: 1.1 $ */ public class JRockitClassAdvisor extends ClassAdvisor { static Weaver weaver = WeaverFactory.createWeaver(); public JRockitClassAdvisor(Class clazz, AspectManager manager) { // FIXME JRockitClassAdvisor constructor super(clazz, manager); } public JRockitClassAdvisor(String classname, AspectManager manager) { // FIXME JRockitClassAdvisor constructor super(classname, manager); } @Override protected void pointcutResolved(JoinPoint info, AdviceBinding binding, Joinpoint joinpoint) { if (info instanceof MethodJoinPoint) { MethodAction.subscribe(weaver, (MethodJoinPoint)info); } else if (info instanceof ConstructorJoinPoint) { ConstructorAction.subscribe(weaver, (ConstructorJoinPoint)info); } } } |