Search in sources :

Example 1 with Extends

use of separate.SourceModel.Extends in project jdk8u_jdk by JetBrains.

the class Compiler method compileHierarchy.

/**
     * Compiles a hierarchy, starting at 'type' and return a mapping of the
     * name to the location where the classfile for that type resides.
     */
private Map<String, File> compileHierarchy(Type type) {
    HashMap<String, File> outputDirs = new HashMap<>();
    File outDir = compileOne(type);
    outputDirs.put(type.getName(), outDir);
    Class superClass = type.getSuperclass();
    if (superClass != null) {
        for (Map.Entry<String, File> each : compileHierarchy(superClass).entrySet()) {
            outputDirs.put(each.getKey(), each.getValue());
        }
    }
    for (Extends ext : type.getSupertypes()) {
        Type iface = ext.getType();
        for (Map.Entry<String, File> each : compileHierarchy(iface).entrySet()) {
            outputDirs.put(each.getKey(), each.getValue());
        }
    }
    return outputDirs;
}
Also used : Type(separate.SourceModel.Type) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap) Class(separate.SourceModel.Class) Extends(separate.SourceModel.Extends) ConcurrentHashMap(java.util.concurrent.ConcurrentHashMap)

Aggregations

ConcurrentHashMap (java.util.concurrent.ConcurrentHashMap)1 Class (separate.SourceModel.Class)1 Extends (separate.SourceModel.Extends)1 Type (separate.SourceModel.Type)1