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

info.javaspec.util.ReflectionUtil Maven / Gradle / Ivy

There is a newer version: 1.0.1
Show newest version
package info.javaspec.util;

import java.lang.reflect.Field;
import java.util.stream.Stream;

public final class ReflectionUtil {
  public static Stream fieldsOfType(Class fieldType, Class typeToInspect) {
    return Stream.of(typeToInspect.getDeclaredFields())
      .filter(x -> x.getType() == fieldType);
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy