public static JBossWebMetaData getJBossWebMetaData ( final DeploymentUnit unit ) { final WarMetaData warMetaData = getOptionalAttachment ( unit , WarMetaData . ATTACHMENT_KEY ) ; JBossWebMetaData result = null ; if ( warMetaData != null ) { result = warMetaData . getMergedJBossWebMetaData ( ) ; if ( result == null ) { result = warMetaData . getJBossWebMetaData ( ) ; } } else { result = getOptionalAttachment ( unit , WSAttachmentKeys . JBOSSWEB_METADATA_KEY ) ; } return result ; }
Gets the JBossWebMetaData from the WarMetaData attached to the provided deployment unit if any .