aboutsummaryrefslogtreecommitdiffstats
path: root/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/FieldAnnotationsTest.java
diff options
context:
space:
mode:
authoraclement <aclement>2007-02-15 15:27:57 +0000
committeraclement <aclement>2007-02-15 15:27:57 +0000
commit41c8c1c3436b3ba20726f3e7d4d2e5c51108ed11 (patch)
tree8558585e8734ca48d148583402152b1bdf3afa9d /bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/FieldAnnotationsTest.java
parentb6ae145e2ae12dbe183a9a3b77fff51fc731711b (diff)
downloadaspectj-41c8c1c3436b3ba20726f3e7d4d2e5c51108ed11.tar.gz
aspectj-41c8c1c3436b3ba20726f3e7d4d2e5c51108ed11.zip
repairing HEAD
Diffstat (limited to 'bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/FieldAnnotationsTest.java')
-rw-r--r--bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/FieldAnnotationsTest.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/FieldAnnotationsTest.java b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/FieldAnnotationsTest.java
index 0bcf1ac81..b62e5d88f 100644
--- a/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/FieldAnnotationsTest.java
+++ b/bcel-builder/testsrc/org/aspectj/apache/bcel/classfile/tests/FieldAnnotationsTest.java
@@ -18,10 +18,11 @@ import java.util.Iterator;
import org.aspectj.apache.bcel.classfile.Field;
import org.aspectj.apache.bcel.classfile.JavaClass;
-import org.aspectj.apache.bcel.classfile.annotation.AnnotationGen;
-import org.aspectj.apache.bcel.classfile.annotation.ElementNameValuePairGen;
+import org.aspectj.apache.bcel.classfile.annotation.Annotation;
+import org.aspectj.apache.bcel.classfile.annotation.ElementNameValuePair;
import org.aspectj.apache.bcel.generic.ClassGen;
import org.aspectj.apache.bcel.generic.FieldGen;
+import org.aspectj.apache.bcel.generic.annotation.AnnotationGen;
import org.aspectj.apache.bcel.util.SyntheticRepository;
@@ -104,7 +105,7 @@ public class FieldAnnotationsTest extends BcelTestCase {
for (int i = 0; i < fields.length; i++) {
Field f = fields[i];
- AnnotationGen[] fieldAnnotations = f.getAnnotations();
+ Annotation[] fieldAnnotations = f.getAnnotations();
if (f.getName().equals(fieldname)) {
checkAnnotation(fieldAnnotations[0],annotationName,annotationElementName,annotationElementValue);
@@ -112,11 +113,11 @@ public class FieldAnnotationsTest extends BcelTestCase {
}
}
- private void checkAnnotation(AnnotationGen a,String name,String elementname,String elementvalue) {
+ private void checkAnnotation(Annotation a,String name,String elementname,String elementvalue) {
assertTrue("Expected annotation to have name "+name+" but it had name "+a.getTypeName(),
a.getTypeName().equals(name));
assertTrue("Expected annotation to have one element but it had "+a.getValues().size(),a.getValues().size()==1);
- ElementNameValuePairGen envp = (ElementNameValuePairGen)a.getValues().get(0);
+ ElementNameValuePair envp = (ElementNameValuePair)a.getValues().get(0);
assertTrue("Expected element name "+elementname+" but was "+envp.getNameString(),
elementname.equals(envp.getNameString()));
assertTrue("Expected element value "+elementvalue+" but was "+envp.getValue().stringifyValue(),
@@ -126,9 +127,9 @@ public class FieldAnnotationsTest extends BcelTestCase {
// helper methods
- public void checkValue(AnnotationGen a,String name,String tostring) {
+ public void checkValue(Annotation a,String name,String tostring) {
for (Iterator i = a.getValues().iterator(); i.hasNext();) {
- ElementNameValuePairGen element = (ElementNameValuePairGen) i.next();
+ ElementNameValuePair element = (ElementNameValuePair) i.next();
if (element.getNameString().equals(name)) {
if (!element.getValue().stringifyValue().equals(tostring)) {
fail("Expected element "+name+" to have value "+tostring+" but it had value "+element.getValue().stringifyValue());