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

org.osgi.util.converter.Converter Maven / Gradle / Ivy

There is a newer version: 2024.11.18751.20241128T090041Z-241100
Show newest version
/*******************************************************************************
 * Copyright (c) Contributors to the Eclipse Foundation
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *
 * SPDX-License-Identifier: Apache-2.0 
 *******************************************************************************/
package org.osgi.util.converter;

import org.osgi.annotation.versioning.ProviderType;

/**
 * The Converter service is used to start a conversion. The service is obtained
 * from the service registry. The conversion is then completed via the
 * Converting interface that has methods to specify the target type.
 *
 * @author $Id: a824136ef93c14f4d195dd7f23ce1270511155dd $
 * @ThreadSafe
 */
@ProviderType
public interface Converter {
	/**
	 * Start a conversion for the given object.
	 *
	 * @param obj The object that should be converted.
	 * @return A {@link Converting} object to complete the conversion.
	 */
	Converting convert(Object obj);

	/**
	 * Start defining a function that can perform given conversions.
	 * 
	 * @return A {@link Functioning} object to complete the definition.
	 */
	Functioning function();

	/**
	 * Obtain a builder to create a modified converter based on this converter.
	 * For more details see the {@link ConverterBuilder} interface.
	 *
	 * @return A new Converter Builder.
	 */
	ConverterBuilder newConverterBuilder();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy