@Documented @Target(value={PACKAGE,TYPE,METHOD}) @Retention(value=RUNTIME) @MirroredAnnotation public @interface Gwtc
This annotation may be applied to a package, class or method, though support for these locations is not guaranteed by all implementations.
The primary use case for this is in testing; when using JUnit 4 support, there is no simple means to define which GWT modules or sources to inherit, so this annotation is used to fill in those details.
By putting this annotation at a package level, you can
| Modifier and Type | Optional Element and Description |
|---|---|
Gwtc.CompileMode |
compileMode |
boolean |
debug
return true to print generated gwt.xml to stdOut during compilation
|
Dependency[] |
dependencies |
Resource[] |
includeGwtXml |
UiTemplate[] |
includeHostHtml |
String[] |
includeSource |
Gwtc.AncestorMode[] |
inheritanceMode |
Gwtc.IsolationMode |
isolationMode |
Property[] |
propertiesGwt |
Property[] |
propertiesGwtConfiguration |
GwtcProperties[] |
propertiesLaunch |
Property[] |
propertiesSystem |
public abstract Gwtc.CompileMode compileMode
Gwtc.CompileMode for this compile;
this value may be overridden, where the annotation closest
to the method / class being run will determine the CompileMode used.
The default run mode is inherit, which will cause the compiler to
check encolsing classes or packages for the compile mode to use.
If no parent specifies any mode, Gwtc.CompileMode.SUPERDEV will be chosen
to encourage maximum development time compile speed.
public abstract GwtcProperties[] propertiesLaunch
public abstract Resource[] includeGwtXml
Resource annotations describing additional
gwt.xml to include. If you want to manually add snippets of xml, be sure
to set Resource.type() to Resource.ResourceType#LITERAL_VALUE.
The .gwt.xml extension will be added automatically when looking for inherited gwt.xml.
Supported resource types are:
Resource.ResourceType.CLASSPATH_RESOURCE - Searches classloaderResource.ResourceType.LITERAL_VALUE - Adds generated snippet of xmlResource.ResourceType.ABSOLUTE_FILE - Specify an absolute path, include extensionResource.ResourceType.CLASS_NAME - Specifies a classname to search for Gwtc annotationsResource.ResourceType.PACKAGE_NAME - Specifies a packagename to search for Gwtc annotationspublic abstract String[] includeSource
public abstract Gwtc.IsolationMode isolationMode
public abstract UiTemplate[] includeHostHtml
Resource annotations describing additional
html code to include in generated host page. If you want to manually
add snippets of html, be sure to set Resource.type()
to Resource.ResourceType#LITERAL_VALUE.
Inheriting an entire file with .htm(l) suffix will cause the
andelements to be extracted from that file and appended to the generated Html file. All other classpath resources will be treated as snippets to directly embed in the body.
Set Resource.qualifier() to "head" to include values in the head instead of body.
Supported resource types are:
Resource.ResourceType.CLASSPATH_RESOURCE - Searches classloaderResource.ResourceType.LITERAL_VALUE - Adds generated snippet of htmlResource.ResourceType.ABSOLUTE_FILE - Specify an absolute path, include extensionpublic abstract Dependency[] dependencies
Dependency elements to include.
These describe your classpath dependencies, and not your gwt.xml module inheritance. For most cases, you should not have to set this, though using maven type dependencies can allow you to easily include jars that are on the classpath.
The compiler will look up the META-INF/maven/group-id/artifact-id/pom.xml resource, and add the jar / folder containing said dependency to the classpath.
If this fails, the compiler will emit a warning and then use System.getenv("M2_HOME")/group/id/artifact-id/version/artifact-id-version.jar
public abstract Gwtc.AncestorMode[] inheritanceMode
Gwtc.AncestorMode values to describe how the given
Gwtc annotation should inherit settings from enclosing classes and packages.
This is primarily to simplify sharing inheritance settings, while also allowing classes or methods to ignore enclosing class or package level settings.
Copyright © December 07, 2012–2015 The Internet Party. All rights reserved.