Examples of ClassAnnotation


Examples of edu.umd.cs.findbugs.ClassAnnotation

        this.fileName = new NameMatch(fileName);
    }

    @Override
    public boolean match(BugInstance bugInstance) {
        ClassAnnotation primaryClassAnnotation = bugInstance.getPrimaryClass();
        if(primaryClassAnnotation == null){
            return false;
        }
        String bugFileName = primaryClassAnnotation.getSourceFileName();
        if(bugFileName == null || bugFileName.isEmpty()){
            return false;
        }
        boolean result = fileName.match(bugFileName);
        if (DEBUG) {
View Full Code Here

Examples of edu.umd.cs.findbugs.ClassAnnotation

        this.className = new NameMatch(className);
    }

    @Override
    public boolean match(BugInstance bugInstance) {
        ClassAnnotation primaryClassAnnotation = bugInstance.getPrimaryClass();
        String bugClassName = primaryClassAnnotation.getClassName();
        boolean result = className.match(bugClassName);
        if (DEBUG) {
            System.out.println("Matching " + bugClassName + " with " + className + ", result = " + result);
        }
        return result;
View Full Code Here

Examples of edu.umd.cs.findbugs.ClassAnnotation

        assertFalse(sm.match(bug));

        bug.addClass("bla", null);
        assertFalse(sm.match(bug));

        ClassAnnotation primaryClass = bug.getPrimaryClass();
        primaryClass.setSourceLines(SourceLineAnnotation.createUnknown("bla", ""));
        assertFalse(sm.match(bug));

        // set right source file
        primaryClass.setSourceLines(SourceLineAnnotation.createUnknown("bla", fileName));

        // exact match
        assertTrue(sm.match(bug));

        // regexp first part
View Full Code Here

Examples of edu.umd.cs.findbugs.ClassAnnotation

    }

    private static void reportNoResourceFound(BugInstance bug) {
        String className = null;
        String packageName = null;
        ClassAnnotation primaryClass = bug.getPrimaryClass();
        if (primaryClass != null) {
            className = primaryClass.getClassName();
            packageName = primaryClass.getPackageName();
        }
        if (Reporter.DEBUG) {
            System.out.println("NOT found resource for a BUG in BUG in class: " //$NON-NLS-1$
                    + packageName + "." //$NON-NLS-1$
                    + className + ": \n\t" //$NON-NLS-1$
View Full Code Here

Examples of edu.umd.cs.findbugs.ClassAnnotation

                        }
                        JavaUI.openInEditor(type, true, true);
                        return;

                    } else if (theAnnotation instanceof ClassAnnotation) {
                        ClassAnnotation fa = (ClassAnnotation) theAnnotation;
                        String className = fa.getClassName();
                        IJavaProject project = getIProject();
                        IType type = project.findType(className);
                        if (type == null) {
                            break findLocation;
                        }
View Full Code Here

Examples of org.apache.felix.scrplugin.annotations.ClassAnnotation

            ((Method) annotatedObject).setAccessible(true);
        } else if (annotatedObject instanceof Field) {
            a = new FieldAnnotation(name, values, (Field) annotatedObject);
            ((Field) annotatedObject).setAccessible(true);
        } else {
            a = new ClassAnnotation(name, values);
        }
        descriptions.add(a);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.