JMethod constructor = valueClass.constructor(JMod.PROTECTED);
JAnnotationUse annotation = constructor.annotate(SuppressWarnings.class);
annotation.paramArray("value", "null");
AbstractJClass usedValueClassType = valueClass.narrow(valueClass.typeParams());
JVar param = constructor.param(JMod.FINAL, usedValueClassType, "implementation");
param.annotate(Nonnull.class);
JConditional nullCheck = constructor.body()._if(JExpr.ref("implementation").eq(JExpr._null()));
JInvocation nullPointerExceptionConstruction = JExpr._new(types._NullPointerException);
nullPointerExceptionConstruction.arg(JExpr.lit("Argument shouldn't be null: 'implementation' argument in class constructor invocation: " + valueClass.fullName()));
nullCheck._then()._throw(nullPointerExceptionConstruction);