Class ConstructorTemplate.fieldAssignmentRhs

java.lang.Object
de.japkit.test.members.constructor.ConstructorTemplate.fieldAssignmentRhs
Enclosing class:
ConstructorTemplate

@CodeFragment(code="#{name}",
              surroundingFragments={"trimToNull","nullCheck"})
class ConstructorTemplate.fieldAssignmentRhs
extends java.lang.Object
The right hand side of the field assignment. It expects the field (from the annotated class) as current src.

By default, the right hand side is just the name of the field / the parameter. For Strings, code for trimming is added. For NotNull annotated fields, a null check is added. So, for ConstructorExample.field3, the following code is generated: Objects.requireNonNull(StringUtils.trimToNull(field3), "field3 must not be null.")

  • Constructor Summary

    Constructors 
    Constructor Description
    fieldAssignmentRhs()  
  • Method Summary

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait