From e793a77000f14fd8272388f7b2878a54e2d628ca Mon Sep 17 00:00:00 2001 From: chiba Date: Wed, 12 Jan 2005 16:09:47 +0000 Subject: implemented removeMethod() etc. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@151 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/bytecode/AttributeInfo.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/main/javassist/bytecode/AttributeInfo.java') diff --git a/src/main/javassist/bytecode/AttributeInfo.java b/src/main/javassist/bytecode/AttributeInfo.java index 28b01846..06d89904 100644 --- a/src/main/javassist/bytecode/AttributeInfo.java +++ b/src/main/javassist/bytecode/AttributeInfo.java @@ -222,4 +222,18 @@ public class AttributeInfo { attr.write(out); } } + + static LinkedList copyAll(LinkedList list, ConstPool cp) { + if (list == null) + return null; + + LinkedList newList = new LinkedList(); + int n = list.size(); + for (int i = 0; i < n; ++i) { + AttributeInfo attr = (AttributeInfo)list.get(i); + newList.add(attr.copy(cp, null)); + } + + return newList; + } } -- cgit v1.2.3