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

com.dslplatform.json.runtime.CompositeParameterNameExtractor Maven / Gradle / Ivy

There is a newer version: 1.10.0
Show newest version
package com.dslplatform.json.runtime;


import com.dslplatform.json.Nullable;

import java.lang.reflect.AccessibleObject;
import java.util.List;

class CompositeParameterNameExtractor implements ParameterNameExtractor {
    private final ParameterNameExtractor[] extractors;

    CompositeParameterNameExtractor(List extractors) {
        this.extractors = extractors.toArray(new ParameterNameExtractor[0]);
    }

    @Nullable
    @Override
    public String[] extractNames(AccessibleObject ctorOrMethod) {
        for (ParameterNameExtractor extractor : extractors) {
            String[] names = extractor.extractNames(ctorOrMethod);
            if (names != null) return names;
        }
        return null;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy