class CtNewWrappedConstructor extends CtNewWrappedMethod {
private static final int PASS_NONE = CtNewConstructor.PASS_NONE;
- private static final int PASS_ARRAY = CtNewConstructor.PASS_ARRAY;
+ // private static final int PASS_ARRAY = CtNewConstructor.PASS_ARRAY;
private static final int PASS_PARAMS = CtNewConstructor.PASS_PARAMS;
public static CtConstructor wrapped(CtClass[] parameterTypes,
}
out.println();
- ConstPool cp = cf.getConstPool();
list = cf.getFields();
n = list.size();
for (int i = 0; i < n; ++i) {
public void atArrayRead(ASTree array, ASTree index)
throws CompileError
{
- int op;
arrayAccess(array, index);
bytecode.addOpcode(getArrayReadOp(exprType, arrayDim));
}
}
protected static int getArrayReadOp(int type, int dim) {
- int op;
if (dim > 0)
return AALOAD;
}
protected static int getArrayWriteOp(int type, int dim) {
- int op;
if (dim > 0)
return AASTORE;
this("cannot find " + e.getMessage());
}
+ public Lex getLex() { return lex; }
+
public String getMessage() {
return reason;
}
}
private int getNameAndType(ConstPool cp) {
- String cname;
int pos = currentPos;
int c = iterator.byteAt(pos);
int index = iterator.u16bitAt(pos + 1);
}
private int getNameAndType(ConstPool cp) {
- String cname;
int pos = currentPos;
int c = iterator.byteAt(pos);
int index = iterator.u16bitAt(pos + 1);
* @see javassist.reflect.ClassMetaobject#invoke(Object, int, Object[])
*/
public class CannotInvokeException extends RuntimeException {
+
+ private Throwable err = null;
+
/**
- * @serial
+ * Returns the cause of this exception. It may return null.
*/
- private Throwable err = null;
+ public Throwable getReason() { return err; }
/**
* Constructs a CannotInvokeException with an error message.
throws CannotCompileException, NotFoundException
{
CtMethod[] ms = clazz.getMethods();
- int identifier = 0;
for (int i = 0; i < ms.length; ++i) {
CtMethod m = ms[i];
int mod = m.getModifiers();
if (superclazz == null)
break;
- String name = superclazz.getName();
try {
superclazz.getDeclaredConstructor(null);
break; // the constructor with no arguments is found.
private final static int typeGif = 3;
private final static int typeJpeg = 4;
private final static int typeText = 5;
- private final static int typeUnknown = 6;
/**
* If this field is not null, the class files taken from