Search in sources :

Example 1 with FieldVisitor

use of org.glassfish.hk2.external.org.objectweb.asm.FieldVisitor in project Payara by payara.

the class CompositeUtil method createField.

/**
 * Add the field to the class, adding the @XmlAttribute annotation for marshalling purposes.
 */
private void createField(ClassWriter cw, String name, Class<?> type) {
    String internalType = getInternalTypeString(type);
    FieldVisitor field = cw.visitField(ACC_PRIVATE, getPropertyName(name), internalType, null, null);
    field.visitAnnotation("Ljavax/xml/bind/annotation/XmlAttribute;", true).visitEnd();
    field.visitEnd();
}
Also used : JsonString(javax.json.JsonString) FieldVisitor(org.glassfish.hk2.external.org.objectweb.asm.FieldVisitor)

Aggregations

JsonString (javax.json.JsonString)1 FieldVisitor (org.glassfish.hk2.external.org.objectweb.asm.FieldVisitor)1