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

io.quarkus.resteasy.reactive.links.runtime.GetterAccessorsContainer Maven / Gradle / Ivy

Go to download

Web Links support for Quarkus REST. Inject web links into response HTTP headers by annotating your endpoint resources.

There is a newer version: 3.17.5
Show newest version
package io.quarkus.resteasy.reactive.links.runtime;

import java.util.HashMap;
import java.util.Map;

/**
 * Utility class that allows us to easily find a {@code GetterAccessor} based on a type and a field name.
 */
public class GetterAccessorsContainer {

    private final Map> getterAccessors = new HashMap<>();

    public GetterAccessor get(String className, String fieldName) {
        return getterAccessors.get(className).get(fieldName);
    }

    public void put(String className, String fieldName, GetterAccessor getterAccessor) {
        if (!getterAccessors.containsKey(className)) {
            getterAccessors.put(className, new HashMap<>());
        }
        Map getterAccessorsByField = getterAccessors.get(className);
        if (!getterAccessorsByField.containsKey(fieldName)) {
            getterAccessorsByField.put(fieldName, getterAccessor);
        }
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy