]> source.dussan.org Git - javassist.git/commitdiff
changed new CtField(CtField,..) to copy annotations.
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Fri, 11 Aug 2006 04:22:50 +0000 (04:22 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Fri, 11 Aug 2006 04:22:50 +0000 (04:22 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@307 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

Readme.html
build.xml
src/main/javassist/CtField.java

index c791af92555f0bbf694a0956abfa81180a4e97c9..977e86e2b63fe8d47a16b7396485ba0f2449042c 100644 (file)
@@ -286,9 +286,15 @@ see javassist.Dump.
     <li>CtClass#toClass() and ClassPool#toClass() were modified to accept a
     <code>ProtectionDomain</code>
     (<a href="http://jira.jboss.com/jira/browse/JASSIST-23">JASSIST-23</a>).
+    ClassPool#toClass(CtClass, ClassLoader) is now a final method.  All
+    subclasses of ClassPool must override toClass(CtClass, ClassLoader,
+    ProtectionDomain).
+
     <li>CtClass#getAvailableAnnotations() etc. have been implemented.
+
     <li>A bug related to a way of dealing with a bridge method was fixed
     (<a href="http://jira.jboss.com/jira/browse/HIBERNATE-37">HIBERNATE-37</a>).
+
     <li>javassist.scopedpool package was added.
 </ul>
 
index 60f051cba351be12a063ca5b45b87101f9474d2d..00973528e5597b0dee60b30fb264e1fbcfe2f120 100644 (file)
--- a/build.xml
+++ b/build.xml
@@ -6,7 +6,7 @@
 
 <project name="javassist" default="jar" basedir=".">
 
-  <property name="dist-version" value="javassist-3.2"/>
+  <property name="dist-version" value="javassist-3.3"/>
 
   <property environment="env"/>
   <property name="target.jar" value="javassist.jar"/>
index 30ea34e837aa52c42c489e8a97c100e642622af9..c8d62f006f84ad6125918713ea63cee699ecee0e 100644 (file)
@@ -82,6 +82,15 @@ public class CtField extends CtMember {
     {
         this(src.fieldInfo.getDescriptor(), src.fieldInfo.getName(),
              declaring);
+        java.util.ListIterator iterator
+            = src.fieldInfo.getAttributes().listIterator();
+        FieldInfo fi = fieldInfo;
+        fi.setAccessFlags(src.fieldInfo.getAccessFlags());
+        ConstPool cp = fi.getConstPool();
+        while (iterator.hasNext()) {
+            AttributeInfo ainfo = (AttributeInfo)iterator.next();
+            fi.addAttribute(ainfo.copy(cp, null));
+        }
     }
 
     private CtField(String typeDesc, String name, CtClass clazz)