public final class Fields extends Object
| Modifier and Type | Method and Description |
|---|---|
static Field |
findField(com.google.common.reflect.TypeToken<?> classType,
String fieldName)
Find a
Field in the class hierarchy of the given type. |
static Field |
findField(com.google.common.reflect.TypeToken<?> classType,
String fieldName,
com.google.common.base.Predicate<Field> predicate)
Find a
Field in the class hierarchy of the given type that passes the predicate. |
public static Field findField(com.google.common.reflect.TypeToken<?> classType, String fieldName) throws NoSuchFieldException
Field in the class hierarchy of the given type.classType - The leaf class to start with.fieldName - Name of the field.Field if found.NoSuchFieldException - If the field is not found.public static Field findField(com.google.common.reflect.TypeToken<?> classType, String fieldName, com.google.common.base.Predicate<Field> predicate) throws NoSuchFieldException
Field in the class hierarchy of the given type that passes the predicate.classType - The leaf class to start with.fieldName - Name of the field.predicate - Predicate for accepting a matched field.Field if found.NoSuchFieldException - If the field is not found.Copyright © 2019 CDAP Licensed under the Apache License, Version 2.0.