Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package pocketknife;
 
 
 
 import static java.lang.annotation.ElementType.FIELD;
 import static java.lang.annotation.RetentionPolicy.CLASS;

Denote that the variable specified by the injection is not required to be present. Value is the Minimum Sdk for generate code. Build.VERSION_CODES.HONEYCOMB_MR1 or greater will result in a default value being generated for Strings and CharSequences.

 @NotRequired 

SaveState:
int i; @NotRequired(Build.VERSION_CODES.HONEYCOMB_MR1) @SaveState String s = "Default Value"; @NotRequired @InjectArgument("BundleKey") int i;
public @interface NotRequired {
    int value() default ..// for string/charSequence defaults minSdk must be Build.VERSION_CODES.HONEYCOMB_MR1
New to GrepCode? Check out our FAQ X