105
105
* pool</em>. {@link ClassModel} provides a lazily-inflated,
106
106
* read-only view of the constant pool via {@link ClassModel#constantPool()}.
107
107
* Descriptions of classfile content is often exposed in the form of various
108
- * subtypes of {@link java.lang.classfile.constantpool. PoolEntry}, such as {@link
109
- * java.lang.classfile.constantpool. ClassEntry} or {@link java.lang.classfile.constantpool. Utf8Entry}.
108
+ * subtypes of {@link PoolEntry}, such as {@link
109
+ * ClassEntry} or {@link Utf8Entry}.
110
110
* <p>
111
111
* Constant pool entries are also exposed through models and elements; in the
112
- * above traversal example, the {@link java.lang.classfile.instruction. InvokeInstruction}
112
+ * above traversal example, the {@link InvokeInstruction}
113
113
* element exposed a method for {@code owner} that corresponds to a {@code
114
114
* Constant_Class_info} entry in the constant pool.
115
115
*
116
116
* <h3>Attributes</h3>
117
117
* Much of the contents of a classfile is stored in attributes; attributes are
118
118
* found on classes, methods, fields, record components, and on the {@code Code}
119
119
* attribute. Most attributes are surfaced as elements; for example, {@link
120
- * java.lang.classfile.attribute. SignatureAttribute} is a {@link
120
+ * SignatureAttribute} is a {@link
121
121
* ClassElement}, {@link MethodElement}, and {@link
122
122
* FieldElement} since it can appear in all of those places, and is
123
123
* included when iterating the elements of the corresponding model.
139
139
* Each standard attribute has an interface (in {@code java.lang.classfile.attribute})
140
140
* which exposes the contents of the attribute and provides factories to
141
141
* construct the attribute. For example, the {@code Signature} attribute is
142
- * defined by the {@link java.lang.classfile.attribute. SignatureAttribute} class, and
143
- * provides accessors for {@link java.lang.classfile.attribute. SignatureAttribute#signature()}
144
- * as well as factories taking {@link java.lang.classfile.constantpool. Utf8Entry} or
142
+ * defined by the {@link SignatureAttribute} class, and
143
+ * provides accessors for {@link SignatureAttribute#signature()}
144
+ * as well as factories taking {@link Utf8Entry} or
145
145
* {@link String}.
146
146
*
147
147
* <h3>Custom attributes</h3>
163
163
* JDK such as {@code CharacterRangeTable}.
164
164
* <p>
165
165
* Unrecognized attributes are delivered as elements of type {@link
166
- * java.lang.classfile.attribute. UnknownAttribute}, which provide access only to the
166
+ * UnknownAttribute}, which provide access only to the
167
167
* {@code byte[]} contents of the attribute.
168
168
* <p>
169
169
* For nonstandard attributes, user-provided attribute mappers can be specified
170
170
* through the use of the {@link
171
- * ClassFile.AttributeMapperOption#of(java.util.function. Function)}}
171
+ * ClassFile.AttributeMapperOption#of(Function)}}
172
172
* classfile option. Implementations of custom attributes should extend {@link
173
173
* CustomAttribute}.
174
174
*
179
179
* for some statically enumerated options, as well as factories for more complex options,
180
180
* including:
181
181
* <ul>
182
- * <li>{@link ClassFile.AttributeMapperOption#of(java.util.function. Function)}
182
+ * <li>{@link ClassFile.AttributeMapperOption#of(Function)}
183
183
* -- specify format of custom attributes</li>
184
184
* <li>{@link ClassFile.AttributesProcessingOption}
185
185
* -- unrecognized or problematic original attributes (default is {@code PASS_ALL_ATTRIBUTES})</li>
231
231
* Builders often support multiple ways of expressing the same entity at
232
232
* different levels of abstraction. For example, the {@code invokevirtual}
233
233
* instruction invoking {@code println} could have been generated with {@link
234
- * CodeBuilder#invokevirtual(java.lang.constant. ClassDesc,
235
- * String, java.lang.constant. MethodTypeDesc) CodeBuilder.invokevirtual}, {@link
234
+ * CodeBuilder#invokevirtual(ClassDesc,
235
+ * String, MethodTypeDesc) CodeBuilder.invokevirtual}, {@link
236
236
* CodeBuilder#invoke(Opcode,
237
- * java.lang.constant. ClassDesc, String, java.lang.constant. MethodTypeDesc,
237
+ * ClassDesc, String, MethodTypeDesc,
238
238
* boolean) CodeBuilder.invoke}, or {@link
239
239
* CodeBuilder#with(ClassFileElement)
240
240
* CodeBuilder.with}.
252
252
*
253
253
* <h3>Symbolic information</h3>
254
254
* To describe symbolic information for classes and types, the API uses the
255
- * nominal descriptor abstractions from {@code java.lang.constant} such as {@link
256
- * java.lang.constant. ClassDesc} and {@link java.lang.constant. MethodTypeDesc},
255
+ * nominal descriptor abstractions from {@link java.lang.constant} such as {@link
256
+ * ClassDesc} and {@link MethodTypeDesc},
257
257
* which is less error-prone than using raw strings.
258
258
* <p>
259
259
* If a constant pool entry has a nominal representation then it provides a
260
260
* method returning the corresponding nominal descriptor type e.g.
261
- * method {@link java.lang.classfile.constantpool. ClassEntry#asSymbol} returns
261
+ * method {@link ClassEntry#asSymbol} returns
262
262
* {@code ClassDesc}.
263
263
* <p>
264
264
* Where appropriate builders provide two methods for building an element with
278
278
* ClassFile API library based on the actual context. Also these nominal
279
279
* descriptors are validated during their construction, so it is not possible to
280
280
* create them with invalid content by mistake. Following example pass class
281
- * name to the {@link java.lang.constant. ClassDesc#of} method for validation
281
+ * name to the {@link ClassDesc#of} method for validation
282
282
* and the library performs automatic conversion to the right internal form of
283
283
* the class name when serialized in the constant pool as a class entry.
284
284
* {@snippet lang=java :
435
435
* corresponding interface to describe that element, and factory methods to
436
436
* create that element. Some element kinds also have convenience methods on the
437
437
* corresponding builder (e.g., {@link
438
- * CodeBuilder#invokevirtual(java.lang.constant. ClassDesc,
439
- * String, java.lang.constant. MethodTypeDesc)}).
438
+ * CodeBuilder#invokevirtual(ClassDesc,
439
+ * String, MethodTypeDesc)}).
440
440
* <p>
441
441
* Most symbolic information in elements is represented by constant pool entries
442
442
* (for example, the owner of a field is represented by a {@link
443
- * java.lang.classfile.constantpool. ClassEntry}.) Factories and builders also
444
- * accept nominal descriptors from {@code java.lang.constant} (e.g., {@link
445
- * java.lang.constant. ClassDesc}.)
443
+ * ClassEntry}.) Factories and builders also
444
+ * accept nominal descriptors from {@link java.lang.constant} (e.g., {@link
445
+ * ClassDesc}.)
446
446
*
447
447
* <h2><a id="data_model"></a>Data model</h2>
448
448
* We define each kind of element by its name, an optional arity indicator (zero
554
554
*
555
555
* @since 24
556
556
*/
557
- package java .lang .classfile ;
557
+ package java .lang .classfile ;
558
+
559
+ import java .lang .classfile .attribute .SignatureAttribute ;
560
+ import java .lang .classfile .attribute .UnknownAttribute ;
561
+ import java .lang .classfile .constantpool .ClassEntry ;
562
+ import java .lang .classfile .constantpool .PoolEntry ;
563
+ import java .lang .classfile .constantpool .Utf8Entry ;
564
+ import java .lang .classfile .instruction .InvokeInstruction ;
565
+ import java .lang .constant .ClassDesc ;
566
+ import java .lang .constant .MethodTypeDesc ;
567
+ import java .util .function .Function ;
0 commit comments