org.eclipse.persistence.jaxb.javamodel.oxm.OXMJavaModelInputImpl Maven / Gradle / Ivy
/*
* Copyright (c) 2011, 2020 Oracle and/or its affiliates. All rights reserved.
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License v. 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0,
* or the Eclipse Distribution License v. 1.0 which is available at
* http://www.eclipse.org/org/documents/edl-v10.php.
*
* SPDX-License-Identifier: EPL-2.0 OR BSD-3-Clause
*/
// Contributors:
// Rick Barkhouse - 2.2 - Initial implementation
package org.eclipse.persistence.jaxb.javamodel.oxm;
import org.eclipse.persistence.jaxb.javamodel.JavaClass;
import org.eclipse.persistence.jaxb.javamodel.JavaModel;
import org.eclipse.persistence.jaxb.javamodel.JavaModelInput;
/**
* INTERNAL:
*
* Purpose: JavaModelInput
implementation backed by a collection of MOXY's
* xmlmodel.JavaClasses
.. Used when bootstrapping a DynamicJAXBContext
from XML Bindings.
*
*
*
* Responsibilities:
*
*
* - Return an array of
JavaClass
objects to be used by the generator.
* - Return the
JavaModel
to be used during generation.
*
*
* @since EclipseLink 2.2
*
* @see org.eclipse.persistence.jaxb.javamodel.JavaModelInput
*/
public class OXMJavaModelInputImpl implements JavaModelInput {
private JavaClass[] jClasses;
private JavaModel jModel;
/**
* Construct a new instance of OXMJavaModelInputImpl
.
*
* @param types - an array of JavaClasses
for which to generate mappings.
* @param javaModel - the JavaModel
to be used.
*/
public OXMJavaModelInputImpl(JavaClass[] types, JavaModel javaModel) {
this.jModel = javaModel;
this.jClasses = types;
}
/**
* Returns this JavaModelInput's
array of JavaClasses
.
*
* @return this JavaModelInput's
array of JavaClasses
.
*/
@Override
public JavaClass[] getJavaClasses() {
return jClasses;
}
/**
* Returns this JavaModelInput's
JavaModel
.
*
* @return this JavaModelInput's
JavaModel
.
*/
@Override
public JavaModel getJavaModel() {
return jModel;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy