public boolean defaulted(String name) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, null);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no field '" + name + "'");
}
return slot.defaulted;
}
ObjectSlot slot = findSlot(name, Byte.TYPE);
// if not initialized yet, we give the default value
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no byte field '" + name + "'");
}
return slot.defaulted ? defaultValue : ((Byte) slot.fieldValue)
.byteValue();
ObjectSlot slot = findSlot(name, Character.TYPE);
// if not initialized yet, we give the default value
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no char field '" + name + "'");
}
return slot.defaulted ? defaultValue : ((Character) slot.fieldValue)
.charValue();
ObjectSlot slot = findSlot(name, Double.TYPE);
// if not initialized yet, we give the default value
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no double field '" + name + "'");
}
return slot.defaulted ? defaultValue : ((Double) slot.fieldValue)
.doubleValue();
ObjectSlot slot = findSlot(name, Float.TYPE);
// if not initialized yet, we give the default value
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no float field '" + name + "'");
}
return slot.defaulted ? defaultValue : ((Float) slot.fieldValue)
.floatValue();
ObjectSlot slot = findSlot(name, Integer.TYPE);
// if not initialized yet, we give the default value
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no int field '" + name + "'");
}
return slot.defaulted ? defaultValue : ((Integer) slot.fieldValue)
.intValue();
ObjectSlot slot = findSlot(name, Long.TYPE);
// if not initialized yet, we give the default value
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no long field '" + name + "'");
}
return slot.defaulted ? defaultValue : ((Long) slot.fieldValue)
.longValue();
ObjectSlot slot = findSlot(name, null);
// if not initialized yet, we give the default value
if (slot == null || slot.field.getType().isPrimitive()) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no Object field '" + name + "'");
}
return slot.defaulted ? defaultValue : slot.fieldValue;
}
ObjectSlot slot = findSlot(name, Short.TYPE);
// if not initialized yet, we give the default value
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no short field '" + name + "'");
}
return slot.defaulted ? defaultValue : ((Short) slot.fieldValue)
.shortValue();
ObjectSlot slot = findSlot(name, Boolean.TYPE);
// if not initialized yet, we give the default value
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no boolean field '" + name + "'");
}
return slot.defaulted ? defaultValue : ((Boolean) slot.fieldValue)
.booleanValue();
public void put(String name, byte value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Byte.TYPE);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no byte field '" + name + "'");
}
slot.fieldValue = Byte.valueOf(value);
slot.defaulted = false; // No longer default value
public void put(String name, char value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Character.TYPE);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no char field '" + name + "'");
}
slot.fieldValue = Character.valueOf(value);
slot.defaulted = false; // No longer default value
public void put(String name, double value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Double.TYPE);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no double field '" + name + "'");
}
slot.fieldValue = Double.valueOf(value);
slot.defaulted = false; // No longer default value
public void put(String name, float value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Float.TYPE);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no float field '" + name + "'");
}
slot.fieldValue = Float.valueOf(value);
slot.defaulted = false; // No longer default value
public void put(String name, int value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Integer.TYPE);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no integer field '" + name + "'");
}
slot.fieldValue = Integer.valueOf(value);
slot.defaulted = false; // No longer default value
public void put(String name, long value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Long.TYPE);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no long field '" + name + "'");
}
slot.fieldValue = Long.valueOf(value);
slot.defaulted = false; // No longer default value
}
ObjectSlot slot = findSlot(name, valueClass);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no Object field '" + name + "'");
}
slot.fieldValue = value;
slot.defaulted = false; // No longer default value
public void put(String name, short value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Short.TYPE);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no short field '" + name + "'");
}
slot.fieldValue = Short.valueOf(value);
slot.defaulted = false; // No longer default value
public void put(String name, boolean value) throws IllegalArgumentException {
ObjectSlot slot = findSlot(name, Boolean.TYPE);
if (slot == null) {
- throw new IllegalArgumentException();
+ throw new IllegalArgumentException("no boolean field '" + name + "'");
}
slot.fieldValue = Boolean.valueOf(value);
slot.defaulted = false; // No longer default value