Package org.sodbeans.compiler.api.descriptors

Examples of org.sodbeans.compiler.api.descriptors.CompilerClassDescriptor


    }

    public static String findJVMClassName(CompilerFileDescriptor fileDescriptor, int targetLine) {
        Iterator<CompilerClassDescriptor> classes = fileDescriptor.getClasses();
        while (classes.hasNext()) {
            CompilerClassDescriptor next = classes.next();
            if (targetLine >= next.getLine()) {
                return staticKeyToJVMName(next.getStaticKey());
            }
        }

        return null;
    }
View Full Code Here


            // Search project files.
            for (int i = 0; i < projectFiles.length; i++) {
                FileObject file = projectFiles[i];
                if (file.getExt().equals("quorum")) {
                    CompilerFileDescriptor fd = compiler.getFileDescriptor(file);
                    CompilerClassDescriptor cd = fd.getClass(className);
                    if (cd != null && cd.getName().equals(className)) {
                         return file;
                    }
                }
            }
           
            // If we make it here, we found nothing, so check the global scope.
            Iterator<CompilerFileDescriptor> allFiles = compiler.getFileDescriptors();
            while (allFiles.hasNext()) {
                CompilerFileDescriptor fd = allFiles.next();
                CompilerClassDescriptor cd = fd.getClass(className);
               
                if (cd != null && cd.getName().equals(className)) {
                    return FileUtil.toFileObject(fd.getFile());
                }
            } 
        }
       
View Full Code Here

            // Search project files.
            for (int i = 0; i < projectFiles.length; i++) {
                FileObject file = projectFiles[i];
                if (file.getExt().equals("quorum")) {
                    CompilerFileDescriptor fd = compiler.getFileDescriptor(file);
                    CompilerClassDescriptor cd = fd.getClass(className);
                    if (cd != null && cd.getName().equals(className)) {
                         return file;
                    }
                }
            }
           
            // If we make it here, we found nothing, so check the global scope.
            Iterator<CompilerFileDescriptor> allFiles = compiler.getFileDescriptors();
            while (allFiles.hasNext()) {
                CompilerFileDescriptor fd = allFiles.next();
                CompilerClassDescriptor cd = fd.getClass(className);
               
                if (cd != null && cd.getName().equals(className)) {
                    return FileUtil.toFileObject(fd.getFile());
                }
            } 
        }
       
View Full Code Here

TOP

Related Classes of org.sodbeans.compiler.api.descriptors.CompilerClassDescriptor

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.