com.sencha.gwt.uibinder.attributeparsers
Class CssNameConverter

java.lang.Object
  extended by com.sencha.gwt.uibinder.attributeparsers.CssNameConverter

public class CssNameConverter
extends Object

Converts css class names to a form safe to use as a Java identifier.


Nested Class Summary
static class CssNameConverter.Failure
          Thrown by convertSet(Set) on name collision.
 
Constructor Summary
CssNameConverter()
           
 
Method Summary
 String convertName(String className)
           
 Map<String,String> convertSet(Set<String> classNames)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CssNameConverter

public CssNameConverter()
Method Detail

convertName

public String convertName(String className)
Parameters:
className - a css class name
Returns:
the same name in a form safe to use as a Java identifier

convertSet

public Map<String,String> convertSet(Set<String> classNames)
                              throws CssNameConverter.Failure
Parameters:
classNames - css class names to convert
Returns:
map of the same class names in a form safe for use as Java identifiers, with the order of the input set preserved
Throws:
CssNameConverter.Failure - on collisions due to conversions


Copyright © 2011. All Rights Reserved.