pocketknife.FragmentBuilder Maven / Gradle / Ivy
The newest version!
package pocketknife;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.METHOD;
import static java.lang.annotation.RetentionPolicy.CLASS;
/**
* Denotes an interface method that will return a fragment with the variables as arguments.
*
*
* {@literal @}FragmentBuilder
* Fragment buildFragment(int i);
*
*
* Generated code will look something like this
*
* public static final String ARG_I = "ARG_I";
*
* Fragment buildFragment(int i) {
* Fragment fragment = new Fragment();
* Bundle args = new Bundle();
* args.putInt(ARG_I, i);
* fragment.setArguments(args);
* return fragment;
* }
*
*/
@Retention(CLASS)
@Target(METHOD)
public @interface FragmentBuilder {
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy