Package edu.umd.cs.findbugs.classfile

Examples of edu.umd.cs.findbugs.classfile.DescriptorFactory


    private final Set<String> calledMethodSignatures = new HashSet<String>();

    private final Set<MethodDescriptor> functionsThatMightBeMistakenForProcedures = new HashSet<MethodDescriptor>();

    public void canonicalizeAll() {
        DescriptorFactory descriptorFactory = DescriptorFactory.instance();
        for (XMethod m : methods.values()) {
            if (m instanceof MethodDescriptor) {
                descriptorFactory.canonicalize((MethodDescriptor) m);
            }
        }
        for (XField f : fields.values()) {
            if (f instanceof FieldDescriptor) {
                descriptorFactory.canonicalize((FieldDescriptor) f);
            }
        }
    }
View Full Code Here


     */
    private boolean sawAnnotationsInApplicationCode;

    public BuildObligationPolicyDatabase(BugReporter bugReporter) {
        this.reporter = bugReporter;
        final DescriptorFactory instance = DescriptorFactory.instance();
        this.willClose = instance.getClassDescriptor(WillClose.class);
        this.willNotClose = instance.getClassDescriptor(WillNotClose.class);
        this.willCloseWhenClosed = instance.getClassDescriptor(WillCloseWhenClosed.class);
        this.cleanupObligation = instance.getClassDescriptor(CleanupObligation.class);
        this.createsObligation = instance.getClassDescriptor(CreatesObligation.class);
        this.dischargesObligation = instance.getClassDescriptor(DischargesObligation.class);

        database = new ObligationPolicyDatabase();
        addBuiltInPolicies();
        URL u = DetectorFactoryCollection.getCoreResource("obligationPolicy.db");
        try {
View Full Code Here

            }
            ClassData cd = (ClassData) entry.getValue();
            data.byteSize += cd.getData().length;
        }
        Set<Entry<String, ICodeBaseEntry>> entrySet2 = classPath.getApplicationCodebaseEntries().entrySet();
        DescriptorFactory descriptorFactory = DescriptorFactory.instance();
        for (Entry<String, ICodeBaseEntry> entry : entrySet2) {
            String className = entry.getKey();
            if(cacheClassData) {
                if(className.endsWith(".class")) {
                    className = className.substring(0, className.length() - 6);
                }
                classAnalysis.remove(descriptorFactory.getClassDescriptor(className));
            }
            data.byteSizeApp += entry.getValue().getNumBytes();
        }
        if(cacheClassData) {
            // create new reference not reachable to anyone except us
View Full Code Here

TOP

Related Classes of edu.umd.cs.findbugs.classfile.DescriptorFactory

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.