com.networknt.jsonoverlay.Builder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-overlay Show documentation
Show all versions of json-overlay Show documentation
A fork of RepreZen JsonOverlay with all dependencies and code generation removed
/*********************************************************************
* 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 - 2025 Weber Informatics LLC | Privacy Policy