String methodName = JAXBUtils.nameToIdentifier(name, JAXBUtils.IdentifierType.GETTER); MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, methodName, "()" + classCode, fieldDescriptor == null ? null : "()" + fieldDescriptor, mv.visitEnd(); methodName = JAXBUtils.nameToIdentifier(name, JAXBUtils.IdentifierType.SETTER); mv = cw.visitMethod(Opcodes.ACC_PUBLIC, methodName, "(" + classCode + ")V", fieldDescriptor == null ? null : "(" + fieldDescriptor + ")V", null);
/** * Constructs a JAXBAssertionBuilder from the QName of the schema type * @param qn the schema type * @throws JAXBException * @throws ClassNotFoundException */ public JaxbAssertionBuilder(QName qn) throws JAXBException, ClassNotFoundException { this(JAXBUtils.namespaceURIToPackage(qn.getNamespaceURI()) + "." + JAXBUtils.nameToIdentifier(qn.getLocalPart(), JAXBUtils.IdentifierType.CLASS), qn); }
/** * Constructs a JAXBAssertionBuilder from the QName of the schema type * @param qn the schema type * @throws JAXBException * @throws ClassNotFoundException */ public JaxbAssertionBuilder(QName qn) throws JAXBException, ClassNotFoundException { this(JAXBUtils.namespaceURIToPackage(qn.getNamespaceURI()) + "." + JAXBUtils.nameToIdentifier(qn.getLocalPart(), JAXBUtils.IdentifierType.CLASS), qn); }
private static Field getElField(String partName, final Class<?> wrapperType) { String fieldName = JAXBUtils.nameToIdentifier(partName, JAXBUtils.IdentifierType.VARIABLE); Field[] fields = ReflectionUtil.getDeclaredFields(wrapperType); for (Field field : fields) { XmlElement el = field.getAnnotation(XmlElement.class); if (el != null && partName.equals(el.name())) { return field; } XmlElementRef xmlElementRefAnnotation = field.getAnnotation(XmlElementRef.class); if (xmlElementRefAnnotation != null && partName.equals(xmlElementRefAnnotation.name())) { return field; } if (field.getName().equals(fieldName)) { return field; } } return null; }
String getAccessor = JAXBUtils.nameToIdentifier(partName, JAXBUtils.IdentifierType.GETTER); String setAccessor = JAXBUtils.nameToIdentifier(partName, JAXBUtils.IdentifierType.SETTER); Method getMethod = null; Method setMethod = null;
String getAccessor = JAXBUtils.nameToIdentifier(partName, JAXBUtils.IdentifierType.GETTER); String setAccessor = JAXBUtils.nameToIdentifier(partName, JAXBUtils.IdentifierType.SETTER); Method getMethod = null; Method setMethod = null;
String getAccessor = JAXBUtils.nameToIdentifier(partName, JAXBUtils.IdentifierType.GETTER); String setAccessor = JAXBUtils.nameToIdentifier(partName, JAXBUtils.IdentifierType.SETTER); Method getMethod = null; Method setMethod = null; getAccessor = JAXBUtils.nameToIdentifier(elField.getName(), JAXBUtils.IdentifierType.GETTER); setAccessor = JAXBUtils.nameToIdentifier(elField.getName(), JAXBUtils.IdentifierType.SETTER); try { getMethod = valueClass.getMethod(getAccessor, AbstractWrapperHelper.NO_CLASSES);
seiName.append(JAXBUtils.namespaceURIToPackage(interfaceName.getNamespaceURI())); seiName.append("."); seiName.append(JAXBUtils.nameToIdentifier(interfaceName.getLocalPart(), JAXBUtils.IdentifierType.INTERFACE)); Class<?> sei = null;
seiName.append(JAXBUtils.namespaceURIToPackage(interfaceName.getNamespaceURI())); seiName.append("."); seiName.append(JAXBUtils.nameToIdentifier(interfaceName.getLocalPart(), JAXBUtils.IdentifierType.INTERFACE));
String methodName = JAXBUtils.nameToIdentifier(name, JAXBUtils.IdentifierType.GETTER); MethodVisitor mv = cw.visitMethod(Opcodes.ACC_PUBLIC, methodName, "()" + classCode, fieldDescriptor == null ? null : "()" + fieldDescriptor, mv.visitEnd(); methodName = JAXBUtils.nameToIdentifier(name, JAXBUtils.IdentifierType.SETTER); mv = cw.visitMethod(Opcodes.ACC_PUBLIC, methodName, "(" + classCode + ")V", fieldDescriptor == null ? null : "(" + fieldDescriptor + ")V", null);