Example usage for com.google.gwt.core.ext.linker SoftPermutation getId

List of usage examples for com.google.gwt.core.ext.linker SoftPermutation getId

Introduction

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

Prototype

public abstract int getId();

Source Link

Document

Returns the soft permutation id that should be passed into gwtOnLoad.

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   w  w  w.j  a v a2 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;
}