82 public TypePath typePath;
83
84 /**
85 * Constructs a new {@link AnnotationNode}. <i>Subclasses must not use this
86 * constructor</i>. Instead, they must use the
87 * {@link #TypeAnnotationNode(int, int, TypePath, String)} version.
88 *
89 * @param typeRef
90 * a reference to the annotated type. See {@link TypeReference}.
91 * @param typePath
92 * the path to the annotated type argument, wildcard bound, array
93 * element type, or static inner type within 'typeRef'. May be
94 * <tt>null</tt> if the annotation targets 'typeRef' as a whole.
95 * @param desc
96 * the class descriptor of the annotation class.
97 * @throws IllegalStateException
98 * If a subclass calls this constructor.
99 */
100 public TypeAnnotationNode(final int typeRef, final TypePath typePath,
101 final String desc) {
102 this(Opcodes.ASM5, typeRef, typePath, desc);
103 if (getClass() != TypeAnnotationNode.class) {
104 throw new IllegalStateException();
105 }
106 }
107
108 /**
109 * Constructs a new {@link AnnotationNode}.
110 *
111 * @param api
112 * the ASM API version implemented by this visitor. Must be one
113 * of {@link Opcodes#ASM4} or {@link Opcodes#ASM5}.
114 * @param typeRef
115 * a reference to the annotated type. See {@link TypeReference}.
116 * @param typePath
117 * the path to the annotated type argument, wildcard bound, array
118 * element type, or static inner type within 'typeRef'. May be
119 * <tt>null</tt> if the annotation targets 'typeRef' as a whole.
120 * @param desc
121 * the class descriptor of the annotation class.
122 */
123 public TypeAnnotationNode(final int api, final int typeRef,
124 final TypePath typePath, final String desc) {
125 super(api, desc);
126 this.typeRef = typeRef;
127 this.typePath = typePath;
128 }
129 }
|
82 public TypePath typePath;
83
84 /**
85 * Constructs a new {@link AnnotationNode}. <i>Subclasses must not use this
86 * constructor</i>. Instead, they must use the
87 * {@link #TypeAnnotationNode(int, int, TypePath, String)} version.
88 *
89 * @param typeRef
90 * a reference to the annotated type. See {@link TypeReference}.
91 * @param typePath
92 * the path to the annotated type argument, wildcard bound, array
93 * element type, or static inner type within 'typeRef'. May be
94 * <tt>null</tt> if the annotation targets 'typeRef' as a whole.
95 * @param desc
96 * the class descriptor of the annotation class.
97 * @throws IllegalStateException
98 * If a subclass calls this constructor.
99 */
100 public TypeAnnotationNode(final int typeRef, final TypePath typePath,
101 final String desc) {
102 this(Opcodes.ASM6, typeRef, typePath, desc);
103 if (getClass() != TypeAnnotationNode.class) {
104 throw new IllegalStateException();
105 }
106 }
107
108 /**
109 * Constructs a new {@link AnnotationNode}.
110 *
111 * @param api
112 * the ASM API version implemented by this visitor. Must be one
113 * of {@link Opcodes#ASM4}, {@link Opcodes#ASM5} or {@link Opcodes#ASM6}.
114 * @param typeRef
115 * a reference to the annotated type. See {@link TypeReference}.
116 * @param typePath
117 * the path to the annotated type argument, wildcard bound, array
118 * element type, or static inner type within 'typeRef'. May be
119 * <tt>null</tt> if the annotation targets 'typeRef' as a whole.
120 * @param desc
121 * the class descriptor of the annotation class.
122 */
123 public TypeAnnotationNode(final int api, final int typeRef,
124 final TypePath typePath, final String desc) {
125 super(api, desc);
126 this.typeRef = typeRef;
127 this.typePath = typePath;
128 }
129 }
|