public class GuidedTourResourceGenerator
extends com.google.gwt.resources.ext.AbstractResourceGenerator
implements com.google.gwt.resources.ext.SupportsGeneratorResultCaching
| Modifier and Type | Field and Description |
|---|---|
protected Unmarshaller |
unmarshaller |
| Constructor and Description |
|---|
GuidedTourResourceGenerator() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
calculateTemplateClassName(Step step)
Calculate the template class name using provided step information.
|
String |
createAssignment(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.resources.ext.ResourceContext context,
com.google.gwt.core.ext.typeinfo.JMethod method) |
protected void |
generateGetLanguageMethod(com.google.gwt.user.rebind.SourceWriter sw,
Set<TourLanguage> foundLanguages)
Generates the getLanguage method for the resource.
|
protected void |
generateGetStepsMethod(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.user.rebind.SourceWriter sw,
GuidedTour mainConfiguration,
List<GuidedTour> languageConfigurations)
Generates the code for steps instantiation.
|
protected void |
generateTourPropertiesMethod(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.user.rebind.SourceWriter sw,
GuidedTour mainConfiguration)
Generates the code for the tour properties getter.
|
protected Unmarshaller |
getUnmarshaller()
Lazy initializator for the unmarshaller.
|
protected String |
guessTemplateClassName(Step step)
Guesses the template class name from the step informations.
|
protected GuidedTour |
loadConfiguration(com.google.gwt.core.ext.TreeLogger logger,
URL configurationFile,
TourLanguage language)
Load the configuration from the specified url.
|
protected Unmarshaller unmarshaller
public String createAssignment(com.google.gwt.core.ext.TreeLogger logger, com.google.gwt.resources.ext.ResourceContext context, com.google.gwt.core.ext.typeinfo.JMethod method) throws com.google.gwt.core.ext.UnableToCompleteException
createAssignment in interface com.google.gwt.resources.ext.ResourceGeneratorcreateAssignment in class com.google.gwt.resources.ext.AbstractResourceGeneratorcom.google.gwt.core.ext.UnableToCompleteExceptionprotected void generateTourPropertiesMethod(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.user.rebind.SourceWriter sw,
GuidedTour mainConfiguration)
throws com.google.gwt.core.ext.UnableToCompleteException
logger - the generator logger.sw - the source writer.mainConfiguration - the main configuration resource.com.google.gwt.core.ext.UnableToCompleteException - if an error occurs during the methods creationprotected void generateGetLanguageMethod(com.google.gwt.user.rebind.SourceWriter sw,
Set<TourLanguage> foundLanguages)
sw - the source writerfoundLanguages - the list of found languagesprotected void generateGetStepsMethod(com.google.gwt.core.ext.TreeLogger logger,
com.google.gwt.user.rebind.SourceWriter sw,
GuidedTour mainConfiguration,
List<GuidedTour> languageConfigurations)
throws com.google.gwt.core.ext.UnableToCompleteException
logger - the generator logger.sw - the source writermainConfiguration - the main configuration resource for the quick tour.languageConfigurations - the language specific configuration for the quick tour.com.google.gwt.core.ext.UnableToCompleteExceptionprotected String calculateTemplateClassName(Step step) throws Exception
step - the step to analyze.Exception - if something go wrong in the calculation.protected String guessTemplateClassName(Step step) throws Exception
step - the step to analyze.Exception - if something go wrong during the guessing phase.protected GuidedTour loadConfiguration(com.google.gwt.core.ext.TreeLogger logger, URL configurationFile, TourLanguage language) throws com.google.gwt.core.ext.UnableToCompleteException
logger - the generator logger.configurationFile - the configuration file url.language - the configuration language.com.google.gwt.core.ext.UnableToCompleteExceptionprotected Unmarshaller getUnmarshaller() throws JAXBException
JAXBExceptionCopyright © 2014. All Rights Reserved.