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

com.dslplatform.json.runtime.ParanamerParameterNameExtractor 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 com.thoughtworks.paranamer.AdaptiveParanamer;
import com.thoughtworks.paranamer.Paranamer;

import java.lang.reflect.AccessibleObject;

class ParanamerParameterNameExtractor implements ParameterNameExtractor {
    private final Paranamer paranamer = new AdaptiveParanamer();

    @Nullable
    @Override
    public String[] extractNames(AccessibleObject ctorOrMethod) {
        String[] names = paranamer.lookupParameterNames(ctorOrMethod, false);
        return names == Paranamer.EMPTY_NAMES ? null : names;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy