com.github.rschmitt.dynamicobject.internal.Reflection Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of dynamic-object Show documentation
Show all versions of dynamic-object Show documentation
Lightweight data modeling for Java, powered by Clojure.
package com.github.rschmitt.dynamicobject.internal;
import com.github.rschmitt.dynamicobject.Cached;
import com.github.rschmitt.dynamicobject.DynamicObject;
import com.github.rschmitt.dynamicobject.Key;
import com.github.rschmitt.dynamicobject.Meta;
import com.github.rschmitt.dynamicobject.Required;
import java.lang.annotation.Annotation;
import java.lang.reflect.Method;
import java.lang.reflect.Modifier;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.util.Arrays;
import java.util.Collection;
import java.util.LinkedHashSet;
import java.util.List;
import java.util.Set;
import java.util.stream.Stream;
import static com.github.rschmitt.dynamicobject.internal.ClojureStuff.cachedRead;
import static java.util.stream.Collectors.toSet;
class Reflection {
static > Collection requiredFields(Class type) {
Collection fields = fieldGetters(type);
return fields.stream().filter(Reflection::isRequired).collect(toSet());
}
static > Set
© 2015 - 2024 Weber Informatics LLC | Privacy Policy