1 2 package annotations; 3 4 5 @ValuesAnnotation( 6 byteValue = 1, 7 charValue = 'A', 8 booleanValue = true, 9 intValue = 1, 10 shortValue = 1, 11 longValue = 1L, 12 floatValue = 1.0f, 13 doubleValue = 1.0d, 14 stringValue = "A", 15 16 enumValue = ValuesEnum.ONE, 17 annotationValue = @ValueAttrAnnotation( "annotation"), 18 classValue = Values.class, 19 20 byteArrayValue = { 1, -1}, 21 charArrayValue = { 'c', 'b', (char)-1}, 22 booleanArrayValue = {true, false}, 23 intArrayValue = { 1, -1}, 24 shortArrayValue = { (short)1, (short)-1}, 25 longArrayValue = { 1L, -1L}, 26 floatArrayValue = { 1.0f, -1.0f}, 27 doubleArrayValue = { 1.0d, -1.0d}, 28 stringArrayValue = { "aa", "bb"}, 29 30 enumArrayValue = {ValuesEnum.ONE, ValuesEnum.TWO}, 31 annotationArrayValue = {@ValueAttrAnnotation( "annotation1"), @ValueAttrAnnotation( "annotation2")}, 32 classArrayValue = {Values.class, Values.class} 33 ) 34 @ValueAttrAnnotation1( "classAnnotation1") 35 @ValueAttrAnnotation2( "classAnnotation2") 36 public class Values { 37 38 @ValueAttrAnnotation1( "fieldAnnotation1") 39 @ValueAttrAnnotation2( "fieldAnnotation2") 40 public String testfield = "test"; 41 42 @ValueAttrAnnotation1( "methodAnnotation1") 43 @ValueAttrAnnotation2( "methodAnnotation2") 44 @ValueAttrAnnotation() 45 public void testMethod( 46 @ValueAttrAnnotation1( "param1Annotation1") 47 @ValueAttrAnnotation2( "param1Annotation2") String param1, 48 @ValueAttrAnnotation1( "param2Annotation1") 49 @ValueAttrAnnotation2( "param2Annotation2") int param2) { 50 } 52 53 } 54 55 | Popular Tags |