Package org.jboss.metadata.web.jboss

Examples of org.jboss.metadata.web.jboss.JBossAnnotationMetaData


* @author Remy Maucherat
*/
public class JBossAnnotationMetaDataParser extends MetaDataElementParser {

    public static JBossAnnotationMetaData parse(XMLStreamReader reader) throws XMLStreamException {
        JBossAnnotationMetaData annotation = new JBossAnnotationMetaData();

        // Handle elements
        while (reader.hasNext() && reader.nextTag() != END_ELEMENT) {
            final Element element = Element.forName(reader.getLocalName());
            switch (element) {
                case CLASS_NAME:
                    annotation.setClassName(reader.getElementText());
                    break;
                case SERVLET_SECURITY:
                    annotation.setServletSecurity(ServletSecurityMetaDataParser.parse(reader));
                    break;
                case RUN_AS:
                    annotation.setRunAs(RunAsMetaDataParser.parse(reader));
                    break;
                case MULTIPART_CONFIG:
                    annotation.setMultipartConfig(MultipartConfigMetaDataParser.parse(reader));
                    break;
                default: throw unexpectedElement(reader);
            }
        }

View Full Code Here

TOP

Related Classes of org.jboss.metadata.web.jboss.JBossAnnotationMetaData

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.