Adding @Target and the associated ElementType enum for specifying the type an annotation is.

This commit is contained in:
Mike Keesey 2012-05-22 15:18:42 -06:00
parent a5c9dd6f24
commit be869932d0
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,22 @@
/* Copyright (c) 2012, Avian Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear
in all copies.
There is NO WARRANTY for this software. See license.txt for
details. */
package java.lang.annotation;
public enum ElementType {
ANNOTATION_TYPE,
CONSTRUCTOR,
FIELD,
LOCAL_VARIABLE,
METHOD,
PACKAGE,
PARAMETER,
TYPE
}

View File

@ -0,0 +1,17 @@
/* Copyright (c) 2012, Avian Contributors
Permission to use, copy, modify, and/or distribute this software
for any purpose with or without fee is hereby granted, provided
that the above copyright notice and this permission notice appear
in all copies.
There is NO WARRANTY for this software. See license.txt for
details. */
package java.lang.annotation;
@Retention(value=RetentionPolicy.RUNTIME)
@Target(value=ElementType.ANNOTATION_TYPE)
public @interface Target {
public ElementType[] value();
}