xapi.source.api.IsGeneric Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of xapi-gwt Show documentation
Show all versions of xapi-gwt Show documentation
This module exists solely to package all other gwt modules into a single
uber jar. This makes deploying to non-mavenized targets much easier.
Of course, you would be wise to inherit your dependencies individually;
the uber jar is intended for projects like collide,
which have complex configuration, and adding many jars would be a pain.
The newest version!
package xapi.source.api;
public interface IsGeneric extends IsType{
/**
* Default bounds of opaque means "just print the name in the <>".
*/
int OPAQUE = 0;
/**
* Bounds of
*/
int EXTENDS = 1;
/**
* Bounds of
* It is illegal to specify more than one generic type
*/
int SUPER = 2;
/**
* A flag for generics that can be erased if we are targetting java 7.
*/
int NILLABLE = 4;
/**
* @return The arbitrary name of this generic; defaults to ?
*
* If it is a fully qualified classname, it will be imported;
* if the writer has access to a TypePool, it will attempt to shorten the
* generic signature automatically.
*/
String genericName();
/**
* @return The bounds strategy to use.
* 0 = print: name == "?" ? genericTypes[0] : name
* 1 = print: name extends join(genericTypes, "&")
* 2 = print: name super genericTypes[0]
* 4 = can print <> in java7 compilations
*/
int genericBounds();
/**
* @return any extra types that should be added to an extends bound.
*
* This will be null or length == 0 unless you want signatures.
* The Y type is represented by this object's IsType declaration.
* Z ... types will be returned by extended types.
*
* Note that using other generic names for types is possibly valid,
* so we support it blindly and leave it up to the developer to ensure that
* their generate signatures are valid.
*
* These types will identify as isPrimitive() as they will lack a package.
*/
IsType[] extendedTypes();
}