[jboss-cvs] container/src/main/org/jboss/reflect/plugins/introspection ...
Kabir Khan
kkhan at jboss.com
Tue Jul 18 07:23:50 EDT 2006
User: kkhan
Date: 06/07/18 07:23:50
Modified: src/main/org/jboss/reflect/plugins/introspection
IntrospectionTypeInfoFactoryImpl.java
Log:
Move annotation creator into container from aop module
Use jboss retro to create a JDK 1.4 dist and test under JDK 1,4.
Revision Changes Path
1.22 +13 -1 container/src/main/org/jboss/reflect/plugins/introspection/IntrospectionTypeInfoFactoryImpl.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: IntrospectionTypeInfoFactoryImpl.java
===================================================================
RCS file: /cvsroot/jboss/container/src/main/org/jboss/reflect/plugins/introspection/IntrospectionTypeInfoFactoryImpl.java,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -b -r1.21 -r1.22
--- IntrospectionTypeInfoFactoryImpl.java 23 Jun 2006 10:07:22 -0000 1.21
+++ IntrospectionTypeInfoFactoryImpl.java 18 Jul 2006 11:23:50 -0000 1.22
@@ -29,6 +29,7 @@
import java.security.AccessController;
import java.security.PrivilegedAction;
+import org.jboss.reflect.plugins.AnnotationAttributeImpl;
import org.jboss.reflect.plugins.AnnotationHelper;
import org.jboss.reflect.plugins.AnnotationInfoImpl;
import org.jboss.reflect.plugins.AnnotationValueFactory;
@@ -39,6 +40,7 @@
import org.jboss.reflect.plugins.EnumInfoImpl;
import org.jboss.reflect.plugins.FieldInfoImpl;
import org.jboss.reflect.plugins.MethodInfoImpl;
+import org.jboss.reflect.spi.AnnotationAttribute;
import org.jboss.reflect.spi.AnnotationInfo;
import org.jboss.reflect.spi.AnnotationValue;
import org.jboss.reflect.spi.ClassInfo;
@@ -258,6 +260,14 @@
else if (clazz.isAnnotation())
{
result = new AnnotationInfoImpl(clazz.getName(), clazz.getModifiers());
+ Method[] methods = getDeclaredMethods(clazz);
+ AnnotationAttributeImpl[] atttributes = new AnnotationAttributeImpl[methods.length];
+ for (int i = 0 ; i < methods.length ; i++)
+ {
+ AnnotationAttributeImpl impl = new AnnotationAttributeImpl(methods[i].getName(), getTypeInfo(methods[i].getReturnType()), null);
+ atttributes[i] = impl;
+ }
+ ((AnnotationInfoImpl)result).setAttributes(atttributes);
}
else if (clazz.isInterface())
{
@@ -342,6 +352,7 @@
return ao.getAnnotations();
}
};
+
return AccessController.doPrivileged(action);
}
}
@@ -356,7 +367,8 @@
{
public Annotation[] run()
{
- return clazz.getAnnotations();
+ Annotation[] annotations = clazz.getAnnotations();
+ return annotations;
}
};
return AccessController.doPrivileged(action);
More information about the jboss-cvs-commits
mailing list