From d494f7fd436543dc3cf052f289220a9d2156f110 Mon Sep 17 00:00:00 2001 From: aclement Date: Tue, 14 Jun 2005 15:17:16 +0000 Subject: [PATCH] Updated with a simple erasure test case - will need more later! --- bcel-builder/testdata/ErasureTestData.java | 7 +++ bcel-builder/testdata/testcode.jar | Bin 16370 -> 16210 bytes .../apache/bcel/classfile/tests/AllTests.java | 1 + .../tests/GenericsErasureTesting.java | 50 ++++++++++++++++++ 4 files changed, 58 insertions(+) create mode 100644 bcel-builder/testdata/ErasureTestData.java create mode 100644 bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/GenericsErasureTesting.java diff --git a/bcel-builder/testdata/ErasureTestData.java b/bcel-builder/testdata/ErasureTestData.java new file mode 100644 index 000000000..493f59a14 --- /dev/null +++ b/bcel-builder/testdata/ErasureTestData.java @@ -0,0 +1,7 @@ +import java.util.*; + +public class ErasureTestData { + + public Vector getData() { return null; } + +} diff --git a/bcel-builder/testdata/testcode.jar b/bcel-builder/testdata/testcode.jar index d954f728a1d02c0dd032735e74982b863ec87c3b..884ed866fd65ab5421e60f4962affe8275db6fa9 100644 GIT binary patch delta 2870 zcmah}2~bm46n!rN6T*@x!7L=9Bmpe4lr$k=LqKsIg~5$VRctJ=BAaEYD6RAlB2%l&l!<&d5dc64vcwC4AplbJZM3Y`0O3$BBURhcF2?9KNTH~s-@3&cV=ExtC5(cE_LWKBEcgv~G#%qAfWD5=AiL;1(NY4Hp=BsjAj

^x+|CWVn0V+Ic5&h6xZQ zNPCD5v!CUjO2pAOAf4(rj|}s+mN$4}>;$B*4h@B++}@&X>SZE~?Zl5CmL8LDD=5mh zPqP;kj=4Hs&XlaR z_0$*I+seh46BXihqZ2p%T>s>H@3o9;|CIE4TviqYMDNhd)3gf9)`ym^OY`k|yEZ7s z+==unb<>+G9tEvgqFcLZecH4g+DoE6RSmxC+clv-8TX&A-c{G$+|n-6edZR4awcpL zte78?K4ymh`ihwwtESL4`R*FY@>fUothN`WMd?$xgJ4?enhp|mV0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da>=5);9Xp@PAKs+xE6E6(U?VD zXzSq{yfXP4+l87Qy=bUju2Y7-%jc4}_O~y;g{=+8yjSR>t!nxsGj8yp!#jiWENokdIc2rQ{>&Ngl(eQV1|BXU;+EMpRb4Rx|Q z>9TPvwq)&TL#dxf zKERq*VPMD%`V$^?a6t>-J!v3$_CBm17VI9FDsLj1S$ggJ&(QY6BHQxfC|}|yPt^aQ zAa_;7rmC)T+l}6a$}!}a(6)oYK+>i5gj8OCkHJ|zjG9Tov!XWNv4Yn(^fsNVMRu)# zWvqz7{H0zvUwy`BGCNlvDLajh>Zk1M^iKBQs{@83G8Tf5BfhffU&Hhz;6ml})c^%i zUpYbPJ7C^4hu=UC{d)JJmL^TdFntlo8o?CfV?cUN9?J4rr!(H4YZ$!UapVfF`;}BWTXU;1AHw@fdfNwqm*m z>6~a(`!zN8+5U<3e9F_D)|y;ffP4wHS*&y>vG|zxZHq$_DcUnmu=a$c~&w^^H{sP7hzeVgvJMrVeKP64*L?tbZIn( zwTH6167nh)zBF2zMzMBt_k%y_rkm1`;")); + } + + + // helper methods below + + public Signature getSignatureAttribute(JavaClass clazz,String name) { + Method m = getMethod(clazz,name); + Attribute[] as = m.getAttributes(); + for (int i = 0; i < as.length; i++) { + Attribute attribute = as[i]; + if (attribute.getName().equals("Signature")) { + return (Signature)attribute; + } + } + return null; + } + +} -- 2.39.5