"Cannot store null in primitive field " + getName()
+ " (" + getType().getSimpleName() + ")");
}
} else if (getType().isPrimitive()) {
if (!PrimitiveAssignment.isCompatible(getType(), value.getClass())) {
throw new IncompatibleTypeTranslationException( value, getName(), getType() );
}
} else if (value.getClass().isPrimitive()) {
if (!PrimitiveAssignment.isCompatible(value.getClass(), getType())) {
throw new IncompatibleTypeTranslationException( value, getName(), getType() );
}
} else if (!getType().isAssignableFrom(value.getClass())) {
throw new IncompatibleTypeTranslationException( value, getName(), getType() );
}
}