
dev.dejvokep.boostedyaml.serialization.YamlSerializer Maven / Gradle / Ivy
/*
* Copyright 2024 https://dejvokep.dev/
*
* 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.
*/
package dev.dejvokep.boostedyaml.serialization;
import dev.dejvokep.boostedyaml.block.Block;
import dev.dejvokep.boostedyaml.settings.general.GeneralSettings;
import dev.dejvokep.boostedyaml.utils.supplier.MapSupplier;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.util.Map;
import java.util.Set;
/**
* Interface used by custom serializer implementations. If you are looking into building your own implementation, it is
* recommended that you read the wiki.
*/
public interface YamlSerializer {
/**
* Attempts to deserialize the given map into a class instance using this serializer.
*
* The given map is a raw object map - there are no {@link Block} instances, just the values themselves.
*
* If the serializer does not recognize the map, or could not deserialize the map, this method must return
* null
.
*
* @param map the raw map to deserialize
* @return the deserialized object
*/
@Nullable
Object deserialize(@NotNull Map
© 2015 - 2025 Weber Informatics LLC | Privacy Policy