Package com.denimgroup.threadfix.annotations

Examples of com.denimgroup.threadfix.annotations.ScanImporter


            candidateComponent.getBeanClassName();
            try {

                Class<?> scannerClass = Class.forName(candidateComponent.getBeanClassName());

                ScanImporter scannerType = scannerClass.getAnnotation(ScanImporter.class);

                assert scannerType != null : "Unable to get scanner type from annotation, something is wrong.";

                LOG.info("Successfully loaded " + scannerClass + " from classpath.");
View Full Code Here


    private void initializeMappingsFromAnnotations() {

        Map<ScanImporter, Class<?>> typeMap = ScannerTypeLoader.getMap();

        for (Entry<ScanImporter, Class<?>> entry : typeMap.entrySet()) {
            ScanImporter annotation = entry.getKey();

            if (annotation.format() == ScanFormat.XML) {
                boolean addedEntry = false;

                if (annotation.startingXMLTags().length != 0) {
                    addToMap(annotation.scannerName(), annotation.startingXMLTags());
                    addedEntry = true;

                } else if (annotation.startingXMLTagSets().length != 0) {
                    for (StartingTagSet startingTagSet : annotation.startingXMLTagSets()) {
                        if (startingTagSet.value().length != 0) {
                            addToMap(annotation.scannerName(), startingTagSet.value());
                            addedEntry = true;
                        }
                    }
                }

                assert addedEntry : "Failed to add an XML entry for scanner " + annotation.scannerName();

            }
        }

        initialized = true;
View Full Code Here

TOP

Related Classes of com.denimgroup.threadfix.annotations.ScanImporter

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.