1 PackageCom.example.ele_me.util;2 3 Importjava.lang.annotation.Retention;4 ImportJava.lang.annotation.Target;5 ImportJava.lang.annotation.ElementType; 6 ImportJava.lang.annotation.RetentionPolicy; 7 8 /** 9 * Use this annotation to mark the fields of your Activity as being injectable.Ten * <p> One * See the {@linkInjector} class for more details about this operates. A */ - @Target ({Elementtype.field}) - @Retention (retentionpolicy.runtime) the Public@InterfaceInjectview { -/** - * The most exciting part of this Java file is @interface, where we generally see the public class to define the type, while in Injectview.java this method of public @interface is used. - */ + Public intvalue (); - //all the images will be written into the value of this function. +} java.lang.annotation.Retention;
The @target and @retention that are obtained by value () are written in the same time, and when you open these two variables, you will find that the things it contains are so rich:
1 Public enum 2 3 45}
1 Public enum 234 }
Wirelessly tutorial (7): Usage of public @interface in annotation