Package com.google.gwt.gadgets.client.impl

Examples of com.google.gwt.gadgets.client.impl.PreferenceGeneratorName


   * of Preference.
   */
  static PreferenceGenerator getPreferenceGenerator(TreeLogger logger,
      JClassType extendsPreferenceType) throws UnableToCompleteException {

    PreferenceGeneratorName generator = extendsPreferenceType.getAnnotation(PreferenceGeneratorName.class);

    if (generator == null) {
      logger.log(TreeLogger.ERROR, "No PreferenceGenerator defined for type "
          + extendsPreferenceType.getQualifiedSourceName(), null);
      throw new UnableToCompleteException();
    }

    try {
      String typeName = generator.value();

      Class<? extends PreferenceGenerator> clazz = Class.forName(typeName).asSubclass(
          PreferenceGenerator.class);
      return clazz.newInstance();
    } catch (ClassCastException e) {
View Full Code Here


   * of Preference.
   */
  static PreferenceGenerator getPreferenceGenerator(TreeLogger logger,
      JClassType extendsPreferenceType) throws UnableToCompleteException {

    PreferenceGeneratorName generator = extendsPreferenceType.getAnnotation(PreferenceGeneratorName.class);

    if (generator == null) {
      logger.log(TreeLogger.ERROR, "No PreferenceGenerator defined for type "
          + extendsPreferenceType.getQualifiedSourceName(), null);
      throw new UnableToCompleteException();
    }

    try {
      String typeName = generator.value();

      Class<? extends PreferenceGenerator> clazz = Class.forName(typeName).asSubclass(
          PreferenceGenerator.class);
      return clazz.newInstance();
    } catch (ClassCastException e) {
View Full Code Here

TOP

Related Classes of com.google.gwt.gadgets.client.impl.PreferenceGeneratorName

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.