[Jboss-cvs] JBossAS SVN: r57019 - in trunk/aop/src: main/org/jboss/aop main/org/jboss/aop/annotation main/org/jboss/aop/annotation/compiler main/org/jboss/aop/annotation/factory main/org/jboss/aop/annotation/factory/duplicate main/org/jboss/aop/introduction main/org/jboss/aop/proxy/container test/org/jboss/test/aop/annotationc test/org/jboss/test/aop/jdk15 test/org/jboss/test/aop/jdk15base
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Sep 20 12:30:23 EDT 2006
Author: kabir.khan at jboss.com
Date: 2006-09-20 12:30:11 -0400 (Wed, 20 Sep 2006)
New Revision: 57019
Added:
trunk/aop/src/main/org/jboss/aop/annotation/factory/
trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/
trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationCreator.java
trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationProxy.java
trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationValidationException.java
trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationValidator.java
trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/SimpleAnnotationValidator.java
Modified:
trunk/aop/src/main/org/jboss/aop/Advisor.java
trunk/aop/src/main/org/jboss/aop/AspectAnnotationLoader.java
trunk/aop/src/main/org/jboss/aop/annotation/AnnotationRepository.java
trunk/aop/src/main/org/jboss/aop/annotation/PortableAnnotationElement.java
trunk/aop/src/main/org/jboss/aop/annotation/compiler/AnnotationDocletTag.java
trunk/aop/src/main/org/jboss/aop/annotation/compiler/AnnotationInfoCreator.java
trunk/aop/src/main/org/jboss/aop/annotation/compiler/XmlAnnotationVisitor.java
trunk/aop/src/main/org/jboss/aop/introduction/AnnotationIntroduction.java
trunk/aop/src/main/org/jboss/aop/proxy/container/AOPProxyFactoryParameters.java
trunk/aop/src/main/org/jboss/aop/proxy/container/ClassProxyContainer.java
trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerCache.java
trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerProxyCacheKey.java
trunk/aop/src/main/org/jboss/aop/proxy/container/GeneratedAOPProxyFactory.java
trunk/aop/src/main/org/jboss/aop/proxy/container/InstanceProxyContainer.java
trunk/aop/src/test/org/jboss/test/aop/annotationc/AnnotationTester.java
trunk/aop/src/test/org/jboss/test/aop/jdk15/AOPTester.java
trunk/aop/src/test/org/jboss/test/aop/jdk15base/AOPTester.java
Log:
[JBAOP-286] Weaken dependencies on unreleased MC 2.0
Modified: trunk/aop/src/main/org/jboss/aop/Advisor.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/Advisor.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/Advisor.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -155,6 +155,8 @@
protected Interceptor[][] constructionInterceptors;
protected ConstructionInfo[] constructionInfos;
+
+ //FIXME - make metaDataContext a MetaDataContext once MC 2.0 is released
MetaDataContext metadataContext;
public Advisor(String name, AspectManager manager)
@@ -496,9 +498,9 @@
return metadataContext;
}
- public void setMetadataContext(MetaDataContext metadataContext)
+ public void setMetadataContext(/*MetaDataContext*/ Object metadataContext)
{
- this.metadataContext = metadataContext;
+ this.metadataContext = (MetaDataContext)metadataContext;
}
public String getName()
Modified: trunk/aop/src/main/org/jboss/aop/AspectAnnotationLoader.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/AspectAnnotationLoader.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/AspectAnnotationLoader.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -31,7 +31,6 @@
import javassist.bytecode.annotation.MemberValue;
import javassist.bytecode.annotation.StringMemberValue;
-import org.jboss.annotation.factory.javassist.AnnotationProxy;
import org.jboss.aop.advice.AdviceBinding;
import org.jboss.aop.advice.AdviceFactory;
import org.jboss.aop.advice.AspectDefinition;
@@ -45,6 +44,7 @@
import org.jboss.aop.advice.PrecedenceDefEntry;
import org.jboss.aop.advice.Scope;
import org.jboss.aop.advice.ScopedInterceptorFactory;
+import org.jboss.aop.annotation.factory.duplicate.javassist.AnnotationProxy;
import org.jboss.aop.introduction.AnnotationIntroduction;
import org.jboss.aop.introduction.InterfaceIntroduction;
import org.jboss.aop.pointcut.CFlow;
Modified: trunk/aop/src/main/org/jboss/aop/annotation/AnnotationRepository.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/AnnotationRepository.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/AnnotationRepository.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -30,7 +30,7 @@
import java.util.Map;
import java.util.Set;
-import org.jboss.annotation.factory.AnnotationCreator;
+import org.jboss.aop.annotation.factory.duplicate.AnnotationCreator;
import org.jboss.logging.Logger;
import EDU.oswego.cs.dl.util.concurrent.ConcurrentReaderHashMap;
Modified: trunk/aop/src/main/org/jboss/aop/annotation/PortableAnnotationElement.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/PortableAnnotationElement.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/PortableAnnotationElement.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -32,8 +32,8 @@
import javassist.bytecode.FieldInfo;
import javassist.bytecode.MethodInfo;
-import org.jboss.annotation.factory.javassist.AnnotationProxy;
import org.jboss.aop.AspectManager;
+import org.jboss.aop.annotation.factory.duplicate.javassist.AnnotationProxy;
import org.jboss.aop.util.ReflectToJavassist;
import java.lang.reflect.Constructor;
Modified: trunk/aop/src/main/org/jboss/aop/annotation/compiler/AnnotationDocletTag.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/compiler/AnnotationDocletTag.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/compiler/AnnotationDocletTag.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -23,11 +23,12 @@
import com.thoughtworks.qdox.model.AbstractJavaEntity;
import com.thoughtworks.qdox.model.DocletTag;
-import org.jboss.annotation.factory.ast.ASTAnnotation;
-import org.jboss.annotation.factory.ast.ASTStart;
-import org.jboss.annotation.factory.ast.AnnotationParser;
-import org.jboss.annotation.factory.ast.ParseException;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTAnnotation;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTStart;
+import org.jboss.aop.annotation.factory.duplicate.ast.AnnotationParser;
+import org.jboss.aop.annotation.factory.duplicate.ast.ParseException;
+
import java.io.StringReader;
import java.util.Map;
Modified: trunk/aop/src/main/org/jboss/aop/annotation/compiler/AnnotationInfoCreator.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/compiler/AnnotationInfoCreator.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/compiler/AnnotationInfoCreator.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -30,18 +30,19 @@
import javassist.bytecode.annotation.CharMemberValue;
import javassist.bytecode.annotation.MemberValue;
import javassist.bytecode.annotation.StringMemberValue;
-import org.jboss.annotation.factory.ast.ASTAnnotation;
-import org.jboss.annotation.factory.ast.ASTChar;
-import org.jboss.annotation.factory.ast.ASTIdentifier;
-import org.jboss.annotation.factory.ast.ASTMemberValueArrayInitializer;
-import org.jboss.annotation.factory.ast.ASTMemberValuePair;
-import org.jboss.annotation.factory.ast.ASTMemberValuePairs;
-import org.jboss.annotation.factory.ast.ASTSingleMemberValue;
-import org.jboss.annotation.factory.ast.ASTStart;
-import org.jboss.annotation.factory.ast.ASTString;
-import org.jboss.annotation.factory.ast.AnnotationParserVisitor;
-import org.jboss.annotation.factory.ast.SimpleNode;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTAnnotation;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTChar;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTIdentifier;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTMemberValueArrayInitializer;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTMemberValuePair;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTMemberValuePairs;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTSingleMemberValue;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTStart;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTString;
+import org.jboss.aop.annotation.factory.duplicate.ast.AnnotationParserVisitor;
+import org.jboss.aop.annotation.factory.duplicate.ast.SimpleNode;
+
import java.util.Iterator;
import java.util.Set;
Modified: trunk/aop/src/main/org/jboss/aop/annotation/compiler/XmlAnnotationVisitor.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/compiler/XmlAnnotationVisitor.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/compiler/XmlAnnotationVisitor.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -21,17 +21,17 @@
*/
package org.jboss.aop.annotation.compiler;
-import org.jboss.annotation.factory.ast.ASTAnnotation;
-import org.jboss.annotation.factory.ast.ASTChar;
-import org.jboss.annotation.factory.ast.ASTIdentifier;
-import org.jboss.annotation.factory.ast.ASTMemberValueArrayInitializer;
-import org.jboss.annotation.factory.ast.ASTMemberValuePair;
-import org.jboss.annotation.factory.ast.ASTMemberValuePairs;
-import org.jboss.annotation.factory.ast.ASTSingleMemberValue;
-import org.jboss.annotation.factory.ast.ASTStart;
-import org.jboss.annotation.factory.ast.ASTString;
-import org.jboss.annotation.factory.ast.AnnotationParserVisitor;
-import org.jboss.annotation.factory.ast.SimpleNode;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTAnnotation;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTChar;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTIdentifier;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTMemberValueArrayInitializer;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTMemberValuePair;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTMemberValuePairs;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTSingleMemberValue;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTStart;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTString;
+import org.jboss.aop.annotation.factory.duplicate.ast.AnnotationParserVisitor;
+import org.jboss.aop.annotation.factory.duplicate.ast.SimpleNode;
import java.io.PrintWriter;
Added: trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationCreator.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationCreator.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationCreator.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -0,0 +1,390 @@
+/*
+ * 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.annotation.factory.duplicate;
+
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTAnnotation;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTChar;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTIdentifier;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTMemberValueArrayInitializer;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTMemberValuePair;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTMemberValuePairs;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTSingleMemberValue;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTStart;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTString;
+import org.jboss.aop.annotation.factory.duplicate.ast.AnnotationParser;
+import org.jboss.aop.annotation.factory.duplicate.ast.AnnotationParserVisitor;
+import org.jboss.aop.annotation.factory.duplicate.ast.Node;
+import org.jboss.aop.annotation.factory.duplicate.ast.SimpleNode;
+import org.jboss.aop.annotation.factory.duplicate.javassist.DefaultValueAnnotationValidator;
+
+import java.io.StringReader;
+import java.lang.reflect.Array;
+import java.lang.reflect.Field;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedActionException;
+import java.security.PrivilegedExceptionAction;
+import java.util.HashMap;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46383 $
+ */
+public class AnnotationCreator implements AnnotationParserVisitor
+{
+ private Class annotation;
+ private Class type;
+ public Object typeValue;
+
+ static final AnnotationValidator defaultAnnotationReader;
+ static
+ {
+ boolean haveJavassist = false;
+ try
+ {
+ Class clazz = Class.forName("javassist.CtClass");
+ haveJavassist = true;
+ }
+ catch(ClassNotFoundException ignore)
+ {
+ }
+
+ if (haveJavassist)
+ {
+ defaultAnnotationReader = new DefaultValueAnnotationValidator();
+ }
+ else
+ {
+ defaultAnnotationReader = new SimpleAnnotationValidator();
+ }
+
+ }
+
+ public AnnotationCreator(Class annotation, Class type)
+ {
+ this.type = type;
+ this.annotation = annotation;
+ }
+
+
+ public Object visit(ASTMemberValuePairs node, Object data)
+ {
+ node.childrenAccept(this, data);
+ return null;
+ }
+
+ public Object visit(ASTMemberValuePair node, Object data)
+ {
+ String name = node.getIdentifier().getValue();
+ node.getValue().jjtAccept(this, name);
+ return data;
+ }
+
+ public Object visit(ASTSingleMemberValue node, Object data)
+ {
+ node.getValue().jjtAccept(this, "value");
+ return data;
+ }
+
+ public Object visit(ASTIdentifier node, Object data)
+ {
+ try
+ {
+ if (type.equals(Class.class))
+ {
+ String classname = node.getValue();
+ if (classname.endsWith(".class"))
+ {
+ classname = classname.substring(0, classname.indexOf(".class"));
+ }
+ if (classname.equals("void"))
+ {
+ typeValue = void.class;
+ }
+ else if (classname.equals("int"))
+ {
+ typeValue = int.class;
+ }
+ else if (classname.equals("byte"))
+ {
+ typeValue = byte.class;
+ }
+ else if (classname.equals("long"))
+ {
+ typeValue = long.class;
+ }
+ else if (classname.equals("double"))
+ {
+ typeValue = double.class;
+ }
+ else if (classname.equals("float"))
+ {
+ typeValue = float.class;
+ }
+ else if (classname.equals("char"))
+ {
+ typeValue = char.class;
+ }
+ else if (classname.equals("short"))
+ {
+ typeValue = short.class;
+ }
+ else if (classname.equals("boolean"))
+ {
+ typeValue = boolean.class;
+ }
+ else
+ {
+ typeValue = Thread.currentThread().getContextClassLoader().loadClass(classname);
+ }
+ }
+ else if (type.isPrimitive())
+ {
+ if (type.equals(boolean.class))
+ {
+ typeValue = new Boolean(node.getValue());
+ }
+ else if (type.equals(short.class))
+ {
+ typeValue = Short.valueOf(node.getValue());
+ }
+ else if (type.equals(float.class))
+ {
+ typeValue = Float.valueOf(node.getValue());
+ }
+ else if (type.equals(double.class))
+ {
+ typeValue = Double.valueOf(node.getValue());
+ }
+ else if (type.equals(long.class))
+ {
+ typeValue = Long.valueOf(node.getValue());
+ }
+ else if (type.equals(byte.class))
+ {
+ typeValue = new Byte(node.getValue());
+ }
+ else if (type.equals(int.class))
+ {
+ typeValue = new Integer(node.getValue());
+ }
+ }
+ else // its an enum
+ {
+ int index = node.getValue().lastIndexOf('.');
+ if (index == -1) throw new RuntimeException("Enum must be fully qualified: " + node.getValue());
+ String className = node.getValue().substring(0, index);
+ String en = node.getValue().substring(index + 1);
+ Class enumClass = Thread.currentThread().getContextClassLoader().loadClass(className);
+
+ if (enumClass.getSuperclass().getName().equals("java.lang.Enum"))
+ {
+ Method valueOf = null;
+ Method[] methods = enumClass.getSuperclass().getMethods();
+ for (int i = 0; i < methods.length; i++)
+ {
+ if (methods[i].getName().equals("valueOf"))
+ {
+ valueOf = methods[i];
+ break;
+ }
+ }
+ Object[] args = {enumClass, en};
+ typeValue = valueOf.invoke(null, args);
+ }
+ else
+ {
+ Field field = enumClass.getField(en);
+ typeValue = field.get(null);
+ }
+ }
+ }
+ catch (ClassNotFoundException e)
+ {
+ throw new RuntimeException(e);
+ }
+ catch (IllegalAccessException e)
+ {
+ throw new RuntimeException(e);
+ }
+ catch (InvocationTargetException e)
+ {
+ throw new RuntimeException(e);
+ }
+ catch (NoSuchFieldException e)
+ {
+ throw new RuntimeException(e);
+ }
+ return null;
+ }
+
+ public Object visit(ASTString node, Object data)
+ {
+ if (!type.equals(String.class)) throw new RuntimeException(annotation.getName() + "." + data + " is not an String");
+ typeValue = node.getValue();
+ return null;
+ }
+
+ public Object visit(ASTChar node, Object data)
+ {
+ if (!type.equals(char.class)) throw new RuntimeException(annotation.getName() + "." + data + " is not an char");
+ typeValue = new Character(node.getValue());
+ return null;
+ }
+
+
+ public Object visit(ASTMemberValueArrayInitializer node, Object data)
+ {
+ if (!type.isArray()) throw new RuntimeException(annotation.getName() + "." + data + " is not an array");
+ Class baseType = type.getComponentType();
+ int size = node.jjtGetNumChildren();
+ typeValue = Array.newInstance(baseType, size);
+
+ for (int i = 0; i < size; i++)
+ {
+ AnnotationCreator creator = new AnnotationCreator(annotation, baseType);
+ node.jjtGetChild(i).jjtAccept(creator, null);
+ Array.set(typeValue, i, creator.typeValue);
+ }
+ return null;
+ }
+
+ public Object visit(ASTAnnotation node, Object data)
+ {
+ try
+ {
+ Class subAnnotation = Thread.currentThread().getContextClassLoader().loadClass(node.getIdentifier());
+ typeValue = createAnnotation(node, subAnnotation);
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException(e);
+ }
+ return null;
+ }
+
+ // Unneeded
+
+ public Object visit(SimpleNode node, Object data)
+ {
+ return null;
+ }
+
+ public Object visit(ASTStart node, Object data)
+ {
+ return null;
+ }
+
+ private static Class getMemberType(Class annotation, String member)
+ {
+ Method[] methods = annotation.getMethods();
+ for (int i = 0; i < methods.length; i++)
+ {
+ if (methods[i].getName().equals(member))
+ {
+ return methods[i].getReturnType();
+ }
+ }
+ throw new RuntimeException("unable to determine member type for annotation: " + annotation.getName() + "." + member);
+ }
+
+ private static ASTAnnotation getRootExpr(final String annotationExpr) throws Exception
+ {
+ try
+ {
+ ASTAnnotation node = (ASTAnnotation)AccessController.doPrivileged(new PrivilegedExceptionAction() {
+ public Object run() throws Exception{
+ AnnotationParser parser = new AnnotationParser(new StringReader(annotationExpr));
+ org.jboss.aop.annotation.factory.duplicate.ast.ASTStart start = parser.Start();
+ ASTAnnotation node = (ASTAnnotation) start.jjtGetChild(0);
+
+ return node;
+ }
+ });
+
+ return node;
+ }
+ catch (PrivilegedActionException e)
+ {
+ throw new RuntimeException(e.getException());
+ }
+ }
+
+
+ public static Object createAnnotation(ASTAnnotation node, Class annotation, ClassLoader cl) throws Exception
+ {
+ HashMap map = new HashMap();
+ if (annotation == null)
+ {
+ ClassLoader loader = (cl != null) ? cl : Thread.currentThread().getContextClassLoader();
+ annotation = loader.loadClass(node.getIdentifier());
+ }
+
+ if (node.jjtGetNumChildren() > 0)
+ {
+ Node contained = node.jjtGetChild(0);
+ if (contained instanceof ASTSingleMemberValue)
+ {
+ Class type = getMemberType(annotation, "value");
+ AnnotationCreator creator = new AnnotationCreator(annotation, type);
+ contained.jjtAccept(creator, "value");
+ map.put("value", creator.typeValue);
+ }
+ else
+ {
+ ASTMemberValuePairs pairs = (ASTMemberValuePairs) contained;
+ for (int i = 0; i < pairs.jjtGetNumChildren(); i++)
+ {
+ ASTMemberValuePair member = (ASTMemberValuePair) pairs.jjtGetChild(i);
+ Class type = getMemberType(annotation, member.getIdentifier().getValue());
+ AnnotationCreator creator = new AnnotationCreator(annotation, type);
+ member.jjtAccept(creator, null);
+ map.put(member.getIdentifier().getValue(), creator.typeValue);
+ }
+ }
+ }
+
+ defaultAnnotationReader.validate(map, annotation);
+ return AnnotationProxy.createProxy(map, annotation);
+ }
+
+ public static Object createAnnotation(ASTAnnotation node, Class annotation) throws Exception
+ {
+ return createAnnotation(node, annotation, null);
+ }
+
+ public static Object createAnnotation(final String annotationExpr, final Class annotation) throws Exception
+ {
+ return createAnnotation(getRootExpr(annotationExpr), annotation, null);
+ }
+
+ public static Object createAnnotation(String annotationExpr, ClassLoader cl) throws Exception
+ {
+ return createAnnotation(getRootExpr(annotationExpr), null, cl);
+ }
+
+
+}
Added: trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationProxy.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationProxy.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationProxy.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -0,0 +1,114 @@
+/*
+ * 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.annotation.factory.duplicate;
+
+import java.lang.reflect.InvocationHandler;
+import java.lang.reflect.Method;
+import java.lang.reflect.Proxy;
+import java.util.Map;
+
+/**
+ * Comment
+ *
+ * @author <a href="mailto:bill at jboss.org">Bill Burke</a>
+ * @author <a href="mailto:kabir.khan at jboss.org">Kabir Khan</a>
+ * @version $Revision: 46363 $
+ */
+public class AnnotationProxy implements InvocationHandler
+{
+ Map map;
+ Class annotationType;
+
+ public AnnotationProxy(Class annotationType, Map valueMap)
+ {
+ this.annotationType = annotationType;
+ map = valueMap;
+ }
+
+ public Object invoke(Object proxy, Method method, Object[] args)
+ throws Throwable
+ {
+ if (method.getName().equals("equals"))
+ {
+ return doEquals(proxy, args[0]);
+ }
+ else if (method.getName().equals("hashCode"))
+ {
+ return doHashCode();
+ }
+ else if (method.getName().equals("toString"))
+ {
+ return map.toString();
+ }
+ else if (method.getName().equals("annotationType"))
+ {
+ return annotationType;
+ }
+
+ /*
+ Object obj = map.get(method.getName());
+ if (!method.getReturnType().equals(obj.getClass()))
+ {
+ System.err.println("***** " + method.toString() + " has bad return type: " + obj.getClass().getName());
+ }
+ return obj;
+ */
+ return map.get(method.getName());
+ }
+
+ public Object getValue(String name)
+ {
+ return map.get(name);
+ }
+
+ private Object doEquals(Object proxy, Object obj)
+ {
+ if (obj == proxy) return Boolean.TRUE;
+ if (obj == null) return Boolean.FALSE;
+
+ Class[] intfs = proxy.getClass().getInterfaces();
+ if (!intfs[0].isAssignableFrom(obj.getClass()))
+ {
+ return Boolean.FALSE;
+ }
+ try
+ {
+ Proxy.getInvocationHandler(obj);
+ }
+ catch (Exception ex)
+ {
+ return Boolean.FALSE;
+ }
+ return Boolean.TRUE;
+ }
+
+ private Object doHashCode()
+ {
+ return new Integer(map.hashCode());
+ }
+
+ public static Object createProxy(Map map, Class annotation) throws Exception
+ {
+ AnnotationProxy proxyHandler = new AnnotationProxy(annotation, map);
+ return java.lang.reflect.Proxy.newProxyInstance(annotation.getClassLoader(), new Class[]{annotation}, proxyHandler);
+ }
+}
Added: trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationValidationException.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationValidationException.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationValidationException.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -0,0 +1,38 @@
+/*
+* 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.annotation.factory.duplicate;
+
+/**
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 46363 $
+ */
+public class AnnotationValidationException extends RuntimeException
+{
+ private static final long serialVersionUID = 2710034018990217179L;
+
+ public AnnotationValidationException(String msg)
+ {
+ super(msg);
+ }
+
+}
Added: trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationValidator.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationValidator.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/AnnotationValidator.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -0,0 +1,43 @@
+/*
+* 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.annotation.factory.duplicate;
+
+import java.util.Map;
+
+/**
+ * Validates that all annotations created for a proxy have been filled in.
+ * Depending on the underlying implementation fills in missing attributes with default values.
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 46363 $
+ */
+public interface AnnotationValidator
+{
+ /**
+ * Validates that all annotations created for a proxy have been filled in.
+ * Depending on the underlying implementation fills in missing attributes with default values.
+ * @param map The annotation attribute values
+ * @param annotation The annotation type
+ * @throws AnnotationValidationException if some attributes were not filled in and no default value exists for that attribute
+ */
+ void validate(Map map, Class annotation);
+}
Added: trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/SimpleAnnotationValidator.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/SimpleAnnotationValidator.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/annotation/factory/duplicate/SimpleAnnotationValidator.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -0,0 +1,72 @@
+/*
+* 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.annotation.factory.duplicate;
+
+import java.lang.reflect.Method;
+import java.security.AccessController;
+import java.security.PrivilegedAction;
+import java.util.ArrayList;
+import java.util.Map;
+
+/**
+ * Validates if all attributes have been filled in for an annotation.
+ * Makes no attempt to read default values
+ *
+ * @author <a href="kabir.khan at jboss.com">Kabir Khan</a>
+ * @version $Revision: 46363 $
+ */
+public class SimpleAnnotationValidator implements AnnotationValidator
+{
+
+ public void validate(Map map, Class annotation)
+ {
+ ArrayList notAssignedAttributes = null;
+ Method[] methods = getDeclaredMethods(annotation);
+ for (int i = 0 ; i < methods.length ; i++)
+ {
+ if (map.get(methods[i].getName()) == null)
+ {
+ if (notAssignedAttributes == null)
+ {
+ notAssignedAttributes = new ArrayList();
+ }
+ notAssignedAttributes.add(methods[i].getName());
+ }
+ }
+
+ if (notAssignedAttributes != null)
+ {
+ throw new AnnotationValidationException("Unable to fill in default attributes for " + annotation + " " + notAssignedAttributes);
+ }
+ }
+
+ private Method[] getDeclaredMethods(final Class clazz)
+ {
+ return (Method[])AccessController.doPrivileged(new PrivilegedAction() {
+ public Object run()
+ {
+ return clazz.getDeclaredMethods();
+ };
+ });
+ }
+
+}
Modified: trunk/aop/src/main/org/jboss/aop/introduction/AnnotationIntroduction.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/introduction/AnnotationIntroduction.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/introduction/AnnotationIntroduction.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -26,9 +26,9 @@
import javassist.CtField;
import javassist.CtMethod;
import org.jboss.aop.Advisor;
-import org.jboss.annotation.factory.ast.ASTAnnotation;
-import org.jboss.annotation.factory.ast.AnnotationParser;
-import org.jboss.annotation.factory.ast.ParseException;
+import org.jboss.aop.annotation.factory.duplicate.ast.ASTAnnotation;
+import org.jboss.aop.annotation.factory.duplicate.ast.AnnotationParser;
+import org.jboss.aop.annotation.factory.duplicate.ast.ParseException;
import org.jboss.aop.pointcut.AnnotationMatcher;
import org.jboss.aop.pointcut.ast.ASTStart;
import org.jboss.aop.pointcut.ast.TypeExpressionParser;
@@ -90,7 +90,7 @@
try
{
AnnotationParser parser = new AnnotationParser(new StringReader(annotationExpr));
- org.jboss.annotation.factory.ast.ASTStart start = parser.Start();
+ org.jboss.aop.annotation.factory.duplicate.ast.ASTStart start = parser.Start();
annotation = (ASTAnnotation) start.jjtGetChild(0);
}
catch (ParseException e)
Modified: trunk/aop/src/main/org/jboss/aop/proxy/container/AOPProxyFactoryParameters.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/proxy/container/AOPProxyFactoryParameters.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/proxy/container/AOPProxyFactoryParameters.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -22,7 +22,7 @@
package org.jboss.aop.proxy.container;
import org.jboss.aop.metadata.SimpleMetaData;
-import org.jboss.repository.spi.MetaDataContext;
+//import org.jboss.repository.spi.MetaDataContext;
/**
*
@@ -33,7 +33,9 @@
{
private Class proxiedClass;
private Object target;
- private MetaDataContext metaDataContext;
+ //FIXME convert back to MetaDataContext once the mc 2.0 has been released
+ //private MetaDataContext metaDataContext;
+ private Object metaDataContext;
private Class[] interfaces;
private AOPProxyFactoryMixin[] mixins;
private boolean objectAsSuperClass;
@@ -49,7 +51,7 @@
Object target,
Class[] interfaces,
AOPProxyFactoryMixin[] mixins,
- MetaDataContext context,
+ Object context,
boolean objectAsSuperClass,
SimpleMetaData simpleMetaData,
ContainerCache containerCache)
@@ -73,12 +75,12 @@
this.interfaces = interfaces;
}
- public MetaDataContext getMetaDataContext()
+ public Object getMetaDataContext()
{
return metaDataContext;
}
- public void setMetaDataContext(MetaDataContext metaDataContext)
+ public void setMetaDataContext(Object metaDataContext)
{
this.metaDataContext = metaDataContext;
}
Modified: trunk/aop/src/main/org/jboss/aop/proxy/container/ClassProxyContainer.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/proxy/container/ClassProxyContainer.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/proxy/container/ClassProxyContainer.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -36,7 +36,7 @@
import org.jboss.aop.introduction.InterfaceIntroduction;
import org.jboss.aop.util.ConstructorComparator;
import org.jboss.aop.util.MethodHashing;
-import org.jboss.repository.spi.MetaDataContext;
+//import org.jboss.repository.spi.MetaDataContext;
/**
* Extension of ClassContainer needed because of Mixins
@@ -154,7 +154,7 @@
}
}
- public InstanceProxyContainer createInstanceProxyContainer(InterfaceIntroduction introduction, MetaDataContext metaDataContext)
+ public InstanceProxyContainer createInstanceProxyContainer(InterfaceIntroduction introduction, /*MetaDataContext*/ Object metaDataContext)
{
ProxyAdvisorDomain domain = new ProxyAdvisorDomain(manager, clazz, false);
domain.setInheritsBindings(true);
Modified: trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerCache.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerCache.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerCache.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -28,7 +28,7 @@
import org.jboss.aop.AspectManager;
import org.jboss.aop.introduction.InterfaceIntroduction;
import org.jboss.aop.metadata.SimpleMetaData;
-import org.jboss.repository.spi.MetaDataContext;
+//import org.jboss.repository.spi.MetaDataContext;
/**
*
@@ -50,10 +50,12 @@
Class[] interfaces;
AOPProxyFactoryMixin[] mixins;
- MetaDataContext metaDataContext;
+ //FIXME - make metaDataContext a MetaDataContext once MC 2.0 is released
+ //MetaDataContext metaDataContext;
+ Object metaDataContext;
SimpleMetaData simpleMetaData;
- private ContainerCache(AspectManager manager, Class proxiedClass, Class[] interfaces, AOPProxyFactoryMixin[] mixins, MetaDataContext metaDataContext, SimpleMetaData simpleMetaData)
+ private ContainerCache(AspectManager manager, Class proxiedClass, Class[] interfaces, AOPProxyFactoryMixin[] mixins, /*MetaDataContext*/ Object metaDataContext, SimpleMetaData simpleMetaData)
{
this.manager = manager;
this.interfaces = interfaces;
@@ -63,12 +65,13 @@
key = new ContainerProxyCacheKey(proxiedClass, interfaces, mixins, metaDataContext);
}
- public static ContainerCache initialise(AspectManager manager, Class proxiedClass, MetaDataContext metaDataContext)
+ public static ContainerCache initialise(AspectManager manager, Class proxiedClass, /*MetaDataContext*/ Object metaDataContext)
{
return initialise(manager, proxiedClass, null, null, metaDataContext, null);
}
- public static ContainerCache initialise(AspectManager manager, Class proxiedClass, Class[] interfaces, AOPProxyFactoryMixin[] mixins, MetaDataContext metaDataContext, SimpleMetaData simpleMetaData)
+ //FIXME - make metaDataContext a MetaDataContext once MC 2.0 is released
+ public static ContainerCache initialise(AspectManager manager, Class proxiedClass, Class[] interfaces, AOPProxyFactoryMixin[] mixins, /*MetaDataContext*/ Object metaDataContext, SimpleMetaData simpleMetaData)
{
ContainerCache factory = new ContainerCache(manager, proxiedClass, interfaces, mixins, metaDataContext, simpleMetaData);
synchronized (mapLock)
Modified: trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerProxyCacheKey.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerProxyCacheKey.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/proxy/container/ContainerProxyCacheKey.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -26,7 +26,7 @@
import java.util.Arrays;
import java.util.Comparator;
-import org.jboss.repository.spi.MetaDataContext;
+//import org.jboss.repository.spi.MetaDataContext;
/**
*
@@ -41,7 +41,11 @@
private WeakReference clazzRef;
private WeakReference[] addedInterfaces = EMTPY_WR_ARRAY;
- private MetaDataContext metaDataContext;
+
+ //FIXME convert back to MetaDataContext once the mc 2.0 has been released
+ //private MetaDataContext metaDataContext;
+ private Object metaDataContext;
+
private AOPProxyFactoryMixin[] addedMixins = EMPTY_MIXIN_ARRAY;
private int hashcode = 0;
@@ -50,14 +54,15 @@
this.clazzRef = new WeakReference(clazz);
}
- public ContainerProxyCacheKey(Class clazz, Class[] addedInterfaces, MetaDataContext metaDataContext)
+ //public ContainerProxyCacheKey(Class clazz, Class[] addedInterfaces, MetaDataContext metaDataContext)
+ public ContainerProxyCacheKey(Class clazz, Class[] addedInterfaces, Object metaDataContext)
{
this(clazz);
this.addedInterfaces = ContainerCacheUtil.getSortedWeakReferenceForInterfaces(addedInterfaces);
this.metaDataContext = metaDataContext;
}
- public ContainerProxyCacheKey(Class clazz, Class[] addedInterfaces, AOPProxyFactoryMixin[] addedMixins, MetaDataContext metaDataContext)
+ public ContainerProxyCacheKey(Class clazz, Class[] addedInterfaces, AOPProxyFactoryMixin[] addedMixins, Object metaDataContext)
{
this(clazz, addedInterfaces, metaDataContext);
Modified: trunk/aop/src/main/org/jboss/aop/proxy/container/GeneratedAOPProxyFactory.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/proxy/container/GeneratedAOPProxyFactory.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/proxy/container/GeneratedAOPProxyFactory.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -27,7 +27,7 @@
import org.jboss.aop.AspectManager;
import org.jboss.aop.instrument.Untransformable;
import org.jboss.aop.metadata.SimpleMetaData;
-import org.jboss.repository.spi.MetaDataContext;
+//import org.jboss.repository.spi.MetaDataContext;
/**
*
@@ -49,8 +49,9 @@
params.getContainerCache());
}
+ //FIXME - make metaDataContext a MetaDataContext once MC 2.0 is released
private Object createAdvisedProxy(boolean objectAsSuper, Class proxiedClass, Class[] interfaces,
- AOPProxyFactoryMixin[] mixins, SimpleMetaData simpleMetaData, Object target, MetaDataContext metaDataContext, ContainerCache containerCache)
+ AOPProxyFactoryMixin[] mixins, SimpleMetaData simpleMetaData, Object target, /*MetaDataContext*/Object metaDataContext, ContainerCache containerCache)
{
AspectManager manager = AspectManager.instance();
@@ -76,8 +77,9 @@
return getProxy(objectAsSuper, manager, proxiedClass, interfaces, mixins, simpleMetaData, target, metaDataContext, containerCache);
}
+ //FIXME - make metaDataContext a MetaDataContext once MC 2.0 is released
private Object getProxy(boolean objectAsSuper, AspectManager manager, Class proxiedClass,
- Class[] interfaces, AOPProxyFactoryMixin[] mixins, SimpleMetaData simpleMetaData, Object target, MetaDataContext metaDataContext, ContainerCache containerCache)
+ Class[] interfaces, AOPProxyFactoryMixin[] mixins, SimpleMetaData simpleMetaData, Object target, /*MetaDataContext*/ Object metaDataContext, ContainerCache containerCache)
{
try
{
Modified: trunk/aop/src/main/org/jboss/aop/proxy/container/InstanceProxyContainer.java
===================================================================
--- trunk/aop/src/main/org/jboss/aop/proxy/container/InstanceProxyContainer.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/main/org/jboss/aop/proxy/container/InstanceProxyContainer.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -32,7 +32,7 @@
import org.jboss.aop.introduction.InterfaceIntroduction;
import org.jboss.aop.joinpoint.Joinpoint;
import org.jboss.aop.metadata.SimpleMetaData;
-import org.jboss.repository.spi.MetaDataContext;
+//import org.jboss.repository.spi.MetaDataContext;
/**
* The InstanceAdvisor returned by ClassProxyContainer
@@ -45,7 +45,7 @@
Advisor classAdvisor;
InstanceAdvisorDelegate delegate;
- public InstanceProxyContainer(String name, ProxyAdvisorDomain instanceDomain, Advisor classAdvisor, MetaDataContext metaDataContext)
+ public InstanceProxyContainer(String name, ProxyAdvisorDomain instanceDomain, Advisor classAdvisor, /*MetaDataContext*/ Object metaDataContext)
{
super(name, instanceDomain);
this.classAdvisor = classAdvisor;
@@ -56,7 +56,7 @@
initialise(classAdvisor.getClazz());
}
- public static InstanceProxyContainer createInstanceProxyContainer(Advisor classAdvisor, InterfaceIntroduction introduction, MetaDataContext metaDataContext)
+ public static InstanceProxyContainer createInstanceProxyContainer(Advisor classAdvisor, InterfaceIntroduction introduction, /*MetaDataContext*/ Object metaDataContext)
{
ProxyAdvisorDomain domain = new ProxyAdvisorDomain(classAdvisor.getManager(), classAdvisor.getClazz(), false, true);
if (introduction != null)
Modified: trunk/aop/src/test/org/jboss/test/aop/annotationc/AnnotationTester.java
===================================================================
--- trunk/aop/src/test/org/jboss/test/aop/annotationc/AnnotationTester.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/test/org/jboss/test/aop/annotationc/AnnotationTester.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -25,9 +25,9 @@
import junit.framework.Test;
import junit.framework.TestSuite;
-import org.jboss.annotation.factory.AnnotationCreator;
import org.jboss.aop.annotation.AnnotationElement;
import org.jboss.aop.annotation.PortableAnnotationElement;
+import org.jboss.aop.annotation.factory.duplicate.AnnotationCreator;
import org.jboss.aop.util.ConstructorComparator;
import org.jboss.test.aop.AOPTestWithSetup;
Modified: trunk/aop/src/test/org/jboss/test/aop/jdk15/AOPTester.java
===================================================================
--- trunk/aop/src/test/org/jboss/test/aop/jdk15/AOPTester.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/test/org/jboss/test/aop/jdk15/AOPTester.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -25,7 +25,7 @@
import junit.framework.TestSuite;
import junit.textui.TestRunner;
-import org.jboss.annotation.factory.AnnotationCreator;
+import org.jboss.aop.annotation.factory.duplicate.AnnotationCreator;
import org.jboss.test.aop.AOPTestWithSetup;
/**
Modified: trunk/aop/src/test/org/jboss/test/aop/jdk15base/AOPTester.java
===================================================================
--- trunk/aop/src/test/org/jboss/test/aop/jdk15base/AOPTester.java 2006-09-20 16:23:20 UTC (rev 57018)
+++ trunk/aop/src/test/org/jboss/test/aop/jdk15base/AOPTester.java 2006-09-20 16:30:11 UTC (rev 57019)
@@ -25,7 +25,7 @@
import junit.framework.TestSuite;
import junit.textui.TestRunner;
-import org.jboss.annotation.factory.AnnotationCreator;
+import org.jboss.aop.annotation.factory.duplicate.AnnotationCreator;
import org.jboss.test.aop.AOPTestWithSetup;
/**
More information about the jboss-cvs-commits
mailing list