Wirelessly tutorial (7): Usage of public @interface in annotation

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.