Example usage for com.google.gwt.core.ext.linker.impl SelectionInformation SelectionInformation

List of usage examples for com.google.gwt.core.ext.linker.impl SelectionInformation SelectionInformation

Introduction

In this page you can find the example usage for com.google.gwt.core.ext.linker.impl SelectionInformation SelectionInformation.

Prototype

public SelectionInformation(String strongName, int softPermutationId, TreeMap<String, String> propMap) 

Source Link

Usage

From source file:cc.alcina.framework.gwt.appcache.linker.PermutationInfoLinker.java

License:Apache License

private List<Artifact<?>> emitSelectionInformation(String strongName, CompilationResult result) {
    List<Artifact<?>> emitted = new ArrayList<Artifact<?>>();
    for (SortedMap<SelectionProperty, String> propertyMap : result.getPropertyMap()) {
        TreeMap<String, String> propMap = new TreeMap<String, String>();
        for (Map.Entry<SelectionProperty, String> entry : propertyMap.entrySet()) {
            propMap.put(entry.getKey().getName(), entry.getValue());
        }/*from ww  w. j a v  a  2 s . c o  m*/
        // The soft properties may not be a subset of the existing set
        for (SoftPermutation soft : result.getSoftPermutations()) {
            // Make a copy we can add add more properties to
            TreeMap<String, String> softMap = new TreeMap<String, String>(propMap);
            // Make sure this SelectionInformation contains the soft
            // properties
            for (Map.Entry<SelectionProperty, String> entry : soft.getPropertyMap().entrySet()) {
                softMap.put(entry.getKey().getName(), entry.getValue());
            }
            emitted.add(new SelectionInformation(strongName, soft.getId(), softMap));
        }
    }
    return emitted;
}