-
Notifications
You must be signed in to change notification settings - Fork 0
/
Bridge.java
124 lines (104 loc) · 3.06 KB
/
Bridge.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
package bridge;
import java.lang.annotation.Repeatable;
import java.lang.annotation.Target;
import static java.lang.annotation.ElementType.*;
import static org.objectweb.asm.Opcodes.*;
/**
* An annotation for creating field & method bridges
*/
@Repeatable(Bridges.class)
@Target({ CONSTRUCTOR, METHOD, FIELD })
public @interface Bridge {
/**
* <code>public</code> access modifier for field & method bridging
*/
int PUBLIC = ACC_PUBLIC;
/**
* <code>protected</code> access modifier for field & method bridging
*/
int PROTECTED = ACC_PROTECTED;
/**
* <code>private</code> access modifier for field & method bridging
*/
int PRIVATE = ACC_PRIVATE;
/**
* <code>static</code> access modifier for field & method bridging
* @implNote This flag cannot be added to fields or methods where it does not already exist
*/
int STATIC = ACC_STATIC;
/**
* <code>final</code> access modifier for field & method bridging
*/
int FINAL = ACC_FINAL;
/**
* <code>synthetic</code> access modifier for field & method bridging
* @implNote This flag is applied by default to all bridges.
*/
int SYNTHETIC = ACC_SYNTHETIC;
/**
* <code>transient</code> access modifier for field bridging
* @implNote This flag is applied by default to field bridges.
*/
int TRANSIENT = ACC_TRANSIENT;
/**
* <code>varargs</code> access modifier for method bridging
*/
int VARARGS = ACC_VARARGS;
/**
* Specifies different access modifiers
*
* @implNote Specify an inverted (negative) value to remove existing modifiers using bit-masking
* @return Access Modifiers
*/
int access() default 0xFFFFFFFF;
/**
* Specifies a different field/method name
*
* @return Name
*/
String name() default "";
/**
* Specifies different method parameters
*
* @implNote The position of parameters in the bridge must be the same as those in the @annotated method
* @return Parameters
*/
Class<?>[] params() default Bridges.class;
/**
* Specifies when to start loading arguments from the bridge method
*
* @return From Index
*/
int fromIndex() default 0;
/**
* Specifies when to start inserting arguments into the @annotated method
*
* @return To Index
*/
int toIndex() default 0;
/**
* Specifies how many parameters from the bridge method to send to the @annotated method
*
* @return Parameter Amount
*/
int length() default 255;
/**
* Specifies generic type data
*
* @return Signature String
*/
String signature() default "";
/**
* Specifies a different field/return type
*
* @return Return Type
*/
Class<?> returns() default Bridges.class;
/**
* Specifies that this bridge is <code>@Deprecated</code> when present
*
* @see Deprecated @Deprecated
* @return Deprecation Status
*/
Deprecated status() default @Deprecated;
}