@Retention(value=CLASS) @Target(value={FIELD,METHOD,PARAMETER}) public @interface RootFragment
Use it on Fragment fields in an EBean annotated classes to inject the
Fragment which originally injected the bean instance.
This field may not be injected at runtime if the fragment used to create the bean is not of the appropriate type, or if the bean is injected in an activity.
Example :
@EBean
public class MyClass {
@RootFragment
Fragment fragment;
// Only injected if the root fragment implements a given interface
@RootFragment
MyInterface fragment;
}
Copyright © 2010–2020 simpligility technologies inc.. All rights reserved.