All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.yedaxia.apidocs.codegenerator.ios.builder.ModelFieldBuilder Maven / Gradle / Ivy

There is a newer version: 1.4.4
Show newest version
package io.github.yedaxia.apidocs.codegenerator.ios.builder;

import io.github.yedaxia.apidocs.codegenerator.ICodeBuilder;
import io.github.yedaxia.apidocs.codegenerator.model.FieldModel;

public class ModelFieldBuilder implements ICodeBuilder{

	private String modelFieldTemplate;
	private FieldModel entryFieldModel;
	
	public ModelFieldBuilder(String modelFieldTemplate, FieldModel entryFieldModel) {
		super();
		this.modelFieldTemplate = modelFieldTemplate;
		this.entryFieldModel = entryFieldModel;
	}

	@Override
	public String build(){
		modelFieldTemplate = modelFieldTemplate.replace("${FIELD_TYPE}",entryFieldModel.getIFieldType());
		modelFieldTemplate = modelFieldTemplate.replace("${FIELD_NAME}",entryFieldModel.getFieldName());
		modelFieldTemplate = modelFieldTemplate.replace("${COMMENT}", entryFieldModel.getComment());
		modelFieldTemplate = modelFieldTemplate.replace("${ASSIGN}", entryFieldModel.getAssign());
	    return modelFieldTemplate + "\n";
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy