Code example for WeakReference

Methods: get

0
         * This is when the view references are actually evaluated. 
         * @param activityOrFragment an activity or fragment 
         */ 
        protected void reallyInjectMemberFragments(Object activityOrFragment) {
 
            final T instance = instanceRef.get();
            if( instance==null )
                return; 
 
            if( activityOrFragment instanceof Context && !(activityOrFragment instanceof Activity ))
                throw new UnsupportedOperationException("Can't inject fragment into a non-Activity context");
 
            Object fragment = null;
 
            try { 
                final InjectFragment injectFragment = (InjectFragment) annotation;
                final int id = injectFragment.value();
                 
                if( id>=0 )
                    fragment = fragmentFindFragmentByIdMethod.invoke(fragmentManagerProvider.get(), id);
Connect your IDE to all the code out there  Get Codota for Java