com.dslplatform.json.runtime.CompositeParameterNameExtractor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dsl-json-java8 Show documentation
Show all versions of dsl-json-java8 Show documentation
DSL Platform compatible Java JSON library (https://dsl-platform.com)
The 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;
}
}