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

com.networknt.jsonoverlay.Builder Maven / Gradle / Ivy

Go to download

A fork of RepreZen JsonOverlay with all dependencies and code generation removed

There is a newer version: 2.1.36
Show newest version
/*********************************************************************
 *  Copyright (c) 2017 ModelSolv, Inc. and others.
 *
 * This program and the accompanying materials are made
 * available under the terms of the Eclipse Public License 2.0
 * which is available at https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 *  Contributors:
 *     ModelSolv, Inc.
 *     - initial API and implementation and/or initial documentation
 **********************************************************************/
package com.networknt.jsonoverlay;

public class Builder {
	private OverlayFactory factory;
	private JsonOverlay modelMember;

	public > Builder(OverlayFactory factory, OV modelMember) {
		this.factory = factory;
		this.modelMember = (JsonOverlay) modelMember;
	}

	public JsonOverlay build() {
		ReferenceManager refMgr = modelMember != null ? modelMember.refMgr : new ReferenceManager();
		@SuppressWarnings("unchecked")
		JsonOverlay castResult = (JsonOverlay) factory.create(JsonOverlay._jsonObject(), null, refMgr);
		return castResult;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy