private static void applyElement ( Annotated member , Schema property ) { final XmlElementWrapper wrapper = member . getAnnotation ( XmlElementWrapper . class ) ; if ( wrapper != null ) { final XML xml = getXml ( property ) ; xml . setWrapped ( true ) ; // No need to set the xml name if the name provided by xmlelementwrapper annotation is ##default or equal to the property name | https://github.com/swagger-api/swagger-core/pull/2050 if ( ! "##default" . equals ( wrapper . name ( ) ) && ! wrapper . name ( ) . isEmpty ( ) && ! wrapper . name ( ) . equals ( ( ( SchemaImpl ) property ) . getName ( ) ) ) { xml . setName ( wrapper . name ( ) ) ; } } else { final XmlElement element = member . getAnnotation ( XmlElement . class ) ; if ( element != null ) { setName ( element . namespace ( ) , element . name ( ) , property ) ; } } }
Puts definitions for XML element .