JAva注記のデフォルト値

951 ワード

package com.zejian.annotationdemo;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
* Created by wuzejian on 2017/5/19.
*       Demo
*/

@Target(ElementType.TYPE)
@Retention(RetentionPolicy.RUNTIME)
@interface Reference{
boolean next() default false;
}

public @interface AnnotationElementDemo {
//    
enum Status {FIXED,NORMAL};

//    
Status status() default Status.FIXED;

//    
boolean showSupport() default false;

//String  
String name()default "";

//class  
Class> testCase() default Void.class;

//    
Reference reference() default @Reference(next=true);

//    
long[] value();
}
--------------------- 
  :zejian_ 
  :CSDN 
  :https://blog.csdn.net/javazejian/article/details/71860633 
    :         ,         !

  
転載先:https://www.cnblogs.com/hfultrastrong/p/9993048.html