protected void appendDefaultConstructors ( XtendTypeDeclaration source , JvmGenericType target ) { final GenerationContext context = getContext ( target ) ; if ( ! context . hasConstructor ( ) ) { // Special case: if a value was not set, we cannot create implicit constructors // in order to have the issue message "The blank final field may not have been initialized". final boolean notInitializedValueField = Iterables . any ( source . getMembers ( ) , it -> { if ( it instanceof XtendField ) { final XtendField op = ( XtendField ) it ; if ( op . isFinal ( ) && op . getInitialValue ( ) == null ) { return true ; } } return false ; } ) ; if ( ! notInitializedValueField ) { // Add the default constructors for the agent, if not already added final JvmTypeReference reference = target . getExtendedClass ( ) ; if ( reference != null ) { final JvmType type = reference . getType ( ) ; if ( type instanceof JvmGenericType ) { copyVisibleJvmConstructors ( ( JvmGenericType ) type , target , source , Sets . newTreeSet ( ) , JvmVisibility . PUBLIC ) ; } } } } }
Add the default constructors .