}
}
private ConstructorInfo createConstructorInfo(Constructor<?> ctor, int length, boolean nullIcptrs)
{
ConstructorInfo info = new ConstructorInfo();
info.setConstructor(ctor);
if (length > 0 && nullIcptrs)
{
throw new IllegalStateException("Cannot have both 0 length and null interceptors");
}
if (nullIcptrs)
{
info.setInterceptors(null);
}
else
{
Interceptor[] interceptors = new Interceptor[length];
for (int i = 0 ; i < length ; i++)
{
interceptors[i] = new TestInterceptor();
}
info.setInterceptors(interceptors);
}
return info;
}