org.cruxframework.crux.plugin.gadget.rebind.gwt
Class GadgetUtils

java.lang.Object
  extended by org.cruxframework.crux.plugin.gadget.rebind.gwt.GadgetUtils

public class GadgetUtils
extends Object

Author:
Thiago da Rosa de Bustamante

Constructor Summary
GadgetUtils()
           
 
Method Summary
static PreferenceGenerator getPreferenceGenerator(com.google.gwt.core.ext.TreeLogger logger, Class<?> extendsPreferenceType)
          Return an instance of a PreferenceGenerator that can be used for a subtype of Preference.
static PreferenceGenerator getPreferenceGenerator(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.typeinfo.JClassType extendsPreferenceType)
          Return an instance of a PreferenceGenerator that can be used for a subtype of Preference.
static Class<?> getUserPrefsType(com.google.gwt.core.ext.TreeLogger logger, Class<?> extendsGadget)
          Returns the subtype of UserPreferences accepted by a Gadget.
static Class<?> getUserPrefsType(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.core.ext.typeinfo.JClassType extendsGadget)
          Returns the subtype of UserPreferences accepted by a Gadget.
static boolean useLongManifestName(com.google.gwt.core.ext.TreeLogger logger, Class<?> extendsGadget)
           
static void writeAnnotationToElement(com.google.gwt.core.ext.TreeLogger logger, Annotation a, Element elt, String... excludeNames)
          Add the key-value pairs of an Annotation to an Element.
static void writeLocalesToElement(com.google.gwt.core.ext.TreeLogger logger, Document d, Element parent, GadgetInfo.GadgetLocale[] locales)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GadgetUtils

public GadgetUtils()
Method Detail

useLongManifestName

public static boolean useLongManifestName(com.google.gwt.core.ext.TreeLogger logger,
                                          Class<?> extendsGadget)

writeAnnotationToElement

public static void writeAnnotationToElement(com.google.gwt.core.ext.TreeLogger logger,
                                            Annotation a,
                                            Element elt,
                                            String... excludeNames)
                                     throws com.google.gwt.core.ext.UnableToCompleteException
Add the key-value pairs of an Annotation to an Element. Enumerated properties will be ignored. Specific properties can be excluded by name.

Throws:
com.google.gwt.core.ext.UnableToCompleteException

writeLocalesToElement

public static void writeLocalesToElement(com.google.gwt.core.ext.TreeLogger logger,
                                         Document d,
                                         Element parent,
                                         GadgetInfo.GadgetLocale[] locales)
                                  throws com.google.gwt.core.ext.UnableToCompleteException
Parameters:
logger -
d -
parent -
locales -
Throws:
com.google.gwt.core.ext.UnableToCompleteException

getUserPrefsType

public static Class<?> getUserPrefsType(com.google.gwt.core.ext.TreeLogger logger,
                                        Class<?> extendsGadget)
Returns the subtype of UserPreferences accepted by a Gadget.


getUserPrefsType

public static Class<?> getUserPrefsType(com.google.gwt.core.ext.TreeLogger logger,
                                        com.google.gwt.core.ext.typeinfo.JClassType extendsGadget)
Returns the subtype of UserPreferences accepted by a Gadget.


getPreferenceGenerator

public static PreferenceGenerator getPreferenceGenerator(com.google.gwt.core.ext.TreeLogger logger,
                                                         com.google.gwt.core.ext.typeinfo.JClassType extendsPreferenceType)
                                                  throws com.google.gwt.core.ext.UnableToCompleteException
Return an instance of a PreferenceGenerator that can be used for a subtype of Preference.

Throws:
com.google.gwt.core.ext.UnableToCompleteException

getPreferenceGenerator

public static PreferenceGenerator getPreferenceGenerator(com.google.gwt.core.ext.TreeLogger logger,
                                                         Class<?> extendsPreferenceType)
                                                  throws com.google.gwt.core.ext.UnableToCompleteException
Return an instance of a PreferenceGenerator that can be used for a subtype of Preference.

Throws:
com.google.gwt.core.ext.UnableToCompleteException


Copyright © 2014. All rights reserved.