* ******************************************************************/
package org.aspectj.weaver;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
-
public class SimpleAnnotationValue extends AnnotationValue {
public SimpleAnnotationValue(int kind) {
case AnnotationValue.PRIMITIVE_SHORT: theShort = ((Short)value).shortValue(); break;
case AnnotationValue.PRIMITIVE_BOOLEAN: theBoolean = ((Boolean)value).booleanValue(); break;
default:
- System.err.println("value = "+whatKindIsThis(kind));
- throw new NotImplementedException();
+ throw new BCException("Not implemented for this kind: "+whatKindIsThis(kind));
}
}
return Boolean.toString(theBoolean);
case 's': // String
return theString;
- default: throw new NotImplementedException();
+ default: throw new BCException("Do not understand this kind: "+valueKind);
}
}
import org.aspectj.org.objectweb.asm.ClassWriter;
import org.aspectj.org.objectweb.asm.Label;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
-
class AjASMAttribute extends Attribute {
private boolean unpacked = false;
* These attributes are read only, an attempt to write them violates this fundamental assumption.
*/
protected ByteVector write(ClassWriter cw, byte[] code, int len, int maxStack, int maxLocals) {
- throw new NotImplementedException();// "Attempt to write out the AjASMAttribute for "+this.type);
+ throw new BCException("Attempt to write out the AjASMAttribute for "+this.type);
// return new ByteVector().putByteArray(data, 0, data.length);
}
import org.aspectj.weaver.AnnotationNameValuePair;
import org.aspectj.weaver.AnnotationValue;
import org.aspectj.weaver.ArrayAnnotationValue;
+import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ClassAnnotationValue;
import org.aspectj.weaver.EnumAnnotationValue;
import org.aspectj.weaver.SimpleAnnotationValue;
import org.aspectj.org.objectweb.asm.AnnotationVisitor;
import org.aspectj.org.objectweb.asm.Type;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
/**
* Constructed with an annotation to 'fill in' with the values we encounter whilst visting it.
if (val!=null) {
a.addNameValuePair(new AnnotationNameValuePair(name,val));
} else {
- System.err.println("Choking on "+name+" = "+value);
- throw new NotImplementedException();
+ throw new BCException("Annotation visitor choked on "+name+" = "+value);
}
}
import org.aspectj.weaver.AnnotationAnnotationValue;
import org.aspectj.weaver.AnnotationValue;
import org.aspectj.weaver.ArrayAnnotationValue;
+import org.aspectj.weaver.BCException;
import org.aspectj.weaver.ClassAnnotationValue;
import org.aspectj.weaver.EnumAnnotationValue;
import org.aspectj.weaver.SimpleAnnotationValue;
import org.aspectj.org.objectweb.asm.AnnotationVisitor;
import org.aspectj.org.objectweb.asm.Type;
-import sun.reflect.generics.reflectiveObjects.NotImplementedException;
class ArrayAnnotationVisitor implements AnnotationVisitor {
List arrayValues = new ArrayList();
if (val!=null) {
arrayValues.add(val);
} else {
- System.err.println("Choking on "+name+" = "+value);
- throw new NotImplementedException();
+ throw new BCException("ArrayAnnotationVisitor choking on "+name+" = "+value);
}
}