Java Code Examples for com.sun.tools.jdeps.ClassFileReader#newInstance()

The following examples show how to use com.sun.tools.jdeps.ClassFileReader#newInstance() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: CallerSensitiveFinder.java    From dragonwell8_jdk with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 2
Source File: CallerSensitiveFinder.java    From TencentKona-8 with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 3
Source File: CallerSensitiveFinder.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 4
Source File: CallerSensitiveFinder.java    From openjdk-jdk8u with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 5
Source File: CallerSensitiveFinder.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 6
Source File: CallerSensitiveFinder.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 7
Source File: CallerSensitiveFinder.java    From hottub with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 8
Source File: CallerSensitiveFinder.java    From openjdk-8-source with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 9
Source File: CallerSensitiveFinder.java    From openjdk-8 with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 10
Source File: CallerSensitiveFinder.java    From jdk8u_jdk with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 11
Source File: CallerSensitiveFinder.java    From jdk8u-jdk with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}
 
Example 12
Source File: CallerSensitiveFinder.java    From jdk8u-dev-jdk with GNU General Public License v2.0 6 votes vote down vote up
public List<String> run(List<Path> classes) throws IOException, InterruptedException,
        ExecutionException, ConstantPoolException
{
    ExecutorService pool = Executors.newFixedThreadPool(numThreads);
    for (Path path : classes) {
        ClassFileReader reader = ClassFileReader.newInstance(path);
        for (ClassFile cf : reader.getClassFiles()) {
            String classFileName = cf.getName();
            // for each ClassFile
            //    parse constant pool to find matching method refs
            //      parse each method (caller)
            //      - visit and find method references matching the given method name
            pool.submit(getTask(cf));
        }
    }
    waitForCompletion();
    pool.shutdown();
    return csMethodsMissingAnnotation;
}