use of org.objectweb.asm.TypeReference in project groovy by apache.
the class AsmClassGenerator method visitRecordComponents.
private void visitRecordComponents(final ClassNode classNode) {
List<RecordComponentNode> recordComponentNodeList = classNode.getRecordComponents();
if (null == recordComponentNodeList)
return;
for (RecordComponentNode recordComponentNode : recordComponentNodeList) {
final ClassNode type = recordComponentNode.getType();
RecordComponentVisitor rcv = classVisitor.visitRecordComponent(recordComponentNode.getName(), BytecodeHelper.getTypeDescription(type), BytecodeHelper.getTypeGenericsSignature(type));
visitAnnotations(recordComponentNode, rcv);
// the int encoded value of the type reference is ALWAYS `318767104`
// TODO Get the magic number `318767104` via `TypeReference.newXXX()`
TypeReference typeRef = new TypeReference(318767104);
visitTypeAnnotations(recordComponentNode.getType(), rcv, typeRef, "", true);
rcv.visitEnd();
}
}
Aggregations