Package com.buschmais.jqassistant.core.analysis.api

Examples of com.buschmais.jqassistant.core.analysis.api.AnalysisListenerException


        Class<? extends Annotation> annotationType = annotation.annotationType();
        Method valueMethod;
        try {
            valueMethod = annotationType.getDeclaredMethod(value);
        } catch (NoSuchMethodException e) {
            throw new AnalysisListenerException("Cannot resolve required method '" + value + "()' for '" + annotationType + "'.");
        }
        Object elementValue;
        try {
            elementValue = valueMethod.invoke(annotation);
        } catch (ReflectiveOperationException e) {
            throw new AnalysisListenerException("Cannot invoke method value() for " + annotationType);
        }
        return elementValue != null ? expectedType.cast(elementValue) : null;
    }
View Full Code Here


    public XmlReportWriter(Writer writer) throws AnalysisListenerException {
        XMLOutputFactory factory = XMLOutputFactory.newInstance();
        try {
            xmlStreamWriter = new IndentingXMLStreamWriter(factory.createXMLStreamWriter(writer));
        } catch (XMLStreamException e) {
            throw new AnalysisListenerException("Cannot create XML stream writer.", e);
        }
    }
View Full Code Here

            }
        });
        try {
            xmlStreamWriter.close();
        } catch (XMLStreamException e) {
            throw new AnalysisListenerException("Cannot close XML stream writer", e);
        }
    }
View Full Code Here

            if (rule instanceof Concept) {
                elementName = "concept";
            } else if (rule instanceof Constraint) {
                elementName = "constraint";
            } else {
                throw new AnalysisListenerException("Cannot write report for unsupported rule " + rule);
            }
            final List<String> columnNames = result.getColumnNames();
            run(new XmlOperation() {
                @Override
                public void run() throws XMLStreamException, AnalysisListenerException {
View Full Code Here

     */
    private void run(XmlOperation operation) throws AnalysisListenerException {
        try {
            operation.run();
        } catch (XMLStreamException e) {
            throw new AnalysisListenerException("Cannot write to XML report.", e);
        }
    }
View Full Code Here

    public JUnitReportWriter(File directory) throws AnalysisListenerException {
        this.directory = directory;
        try {
            jaxbContext = JAXBContext.newInstance(ObjectFactory.class);
        } catch (JAXBException e) {
            throw new AnalysisListenerException("Cannot create jaxb context instance.", e);
        }
    }
View Full Code Here

            Marshaller marshaller = jaxbContext.createMarshaller();
            marshaller.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, true);
            marshaller.setProperty(Marshaller.JAXB_ENCODING, "UTF-8");
            marshaller.marshal(testsuite, file);
        } catch (JAXBException e) {
            throw new AnalysisListenerException("Cannot write JUnit report.", e);
        }
        this.group = null;
        this.results.clear();
    }
View Full Code Here

TOP

Related Classes of com.buschmais.jqassistant.core.analysis.api.AnalysisListenerException

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.