commit | author | age
|
669527
|
1 |
|
U |
2 |
package de.uhilger.transit;
|
|
3 |
|
|
4 |
import static java.lang.annotation.ElementType.METHOD;
|
|
5 |
import java.lang.annotation.Retention;
|
|
6 |
import java.lang.annotation.RetentionPolicy;
|
|
7 |
import java.lang.annotation.Target;
|
|
8 |
|
|
9 |
/**
|
|
10 |
* Annotation to denote access for a method.
|
|
11 |
*
|
|
12 |
* Transit will allow access for methods with Access.Type.ALLOW and
|
|
13 |
* for methods without an Access annotation
|
|
14 |
*
|
|
15 |
* Methods with an Access.Type.RESTRICT annotation are not accessible
|
|
16 |
* via Transit
|
|
17 |
*
|
|
18 |
* @author Copyright (c) Ulrich Hilger, http://uhilger.de
|
|
19 |
* @author Published under the terms and conditions of
|
|
20 |
* the <a href="http://www.gnu.org/licenses/" target="_blank">GNU General Public License</a>
|
|
21 |
*/
|
|
22 |
@Target( { METHOD } )
|
|
23 |
@Retention( RetentionPolicy.RUNTIME )
|
|
24 |
public @interface Access {
|
|
25 |
/** API method access types as distinguished by this interface */
|
|
26 |
enum Type{ALLOW, RESTRICT}
|
|
27 |
/** type of database column */
|
|
28 |
Type type() default Type.ALLOW;
|
|
29 |
|
|
30 |
}
|