code: private void addConstructorByKeyRef() {
      context.constructorByKeyRef = MethodSpec.constructorBuilder().addParameter(keyRefSpec);
      addCommonParameters(context.constructorByKeyRef);
      if (isBaseClass()) {
        assignKeyRefAndValue();
      } else {
        callParentByKeyRef();
      }
    }
docs: Adds the constructor by key reference to the node type.