/** * Returns the field definition for the named field. Field must be a component type. * * @param clazz Class to be searched. * @param name Name of the field. * @return The corresponding field definition, or null if no matching field was found. */ private static Field findField(Class<?> clazz, String name) { try { Field result = FieldUtils.getField(clazz, name, true); return isComponent(result.getType()) ? result : null; } catch (Exception e) { return null; } }
component = isComponent(clazz) ? (BaseComponent) instance : root; } else if (target.startsWith("@")) { Field field = findField(clazz, target.substring(1));