Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /**
- * hacked
- */
- public void reallyInjectFragmentMembers(View view) {
- checkNotNull(instance);
- Object value = null;
- try {
- value = view.findViewById(annotation.value());
- if (value == null && Nullable.notNullable(field))
- throw new NullPointerException(String.format("Can't inject null value into %s.%s when field is not @Nullable", field.getDeclaringClass(), field.getName()));
- field.setAccessible(true);
- field.set(instance, value);
- } catch (IllegalAccessException e) {
- throw new RuntimeException(e);
- } catch (IllegalArgumentException f) {
- throw new IllegalArgumentException(String.format("Can't assign %s value %s to %s field %s", value != null ? value.getClass() : "(null)", value,
- field.getType(), field.getName()));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement