Class State
java.lang.Object
com.google.web.bindery.requestfactory.apt.State
- Direct Known Subclasses:
State.ForTesting
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static classSlightly tweaked implementation used when running tests. -
Field Summary
FieldsModifier and TypeFieldDescription(package private) final TypeMirror(package private) final Elements(package private) final DeclaredType(package private) final DeclaredType(package private) final DeclaredType(package private) final Filer(package private) final DeclaredType(package private) final DeclaredType(package private) final DeclaredType(package private) final DeclaredType(package private) final DeclaredType(package private) final DeclaredType(package private) final Set<TypeElement>(package private) final DeclaredType(package private) final Types(package private) final DeclaredType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMapping(ExecutableElement clientMethod, ExecutableElement domainMethod) Add a mapping from a client method to a domain method.voidaddMapping(TypeElement clientType, TypeElement domainType) Add a mapping from a client type to a domain type.voidCheck an element for anExtraTypesannotation.voidPrint a warning message if verbose mode is enabled.voidUtility method to look up raw types from class literals.Returns a map of client elements to their domain counterparts.booleanbooleanisMappingRequired(TypeElement element) booleanbooleanisTransportableType(TypeMirror asType) Verifies that the given type may be used with RequestFactory.voidmaybeScanContext(TypeElement requestContext) voidmaybeScanFactory(TypeElement factoryType) voidmaybeScanProxy(TypeElement proxyType) booleanvoidEmits a fatal error message attached to an element.voidrequireMapping(TypeElement interfaceElement) (package private) booleanThis switch allows the RfValidatorTest code to be worked on in the IDE without causing compilation failures.voidsetClientOnly(boolean clientOnly) Set totrueto indicate that only JVM-client support code needs to be generated.voidsetMustResolveAllMappings(boolean requireAllMappings) Set totrueif it is an error for unresolved ProxyForName and ServiceName annotations to be left over.(package private) static TypeMirrorviewAs(DeclaredType desiredType, TypeMirror searchFrom, State state) Used to take aFooRequest extends Request<Foo>and find theRequest<Foo>type.voidEmits a warning message, unless the element or an enclosing element are annotated with a@SuppressWarnings("requestfactory").
-
Field Details
-
baseProxyType
-
elements
-
entityProxyIdType
-
entityProxyType
-
extraTypesAnnotation
-
filer
-
instanceRequestType
-
locatorType
-
objectType
-
requestContextType
-
requestFactoryType
-
requestType
-
serviceLocatorType
-
seen
-
types
-
valueProxyType
-
-
Constructor Details
-
State
-
-
Method Details
-
viewAs
Used to take aFooRequest extends Request<Foo>and find theRequest<Foo>type. -
addMapping
Add a mapping from a client method to a domain method. -
addMapping
Add a mapping from a client type to a domain type. -
checkExtraTypes
Check an element for anExtraTypesannotation. Handles both methods and types. -
debug
Print a warning message if verbose mode is enabled. A warning is used to ensure that the message shows up in Eclipse's editor (a note only makes it into the error console). -
executeJobs
public void executeJobs() -
findType
Utility method to look up raw types from class literals. -
getClientToDomainMap
Returns a map of client elements to their domain counterparts. The keys may be RequestContext or Proxy types or methods within those types. -
isClientOnly
public boolean isClientOnly() -
isMappingRequired
-
isPoisoned
public boolean isPoisoned() -
isTransportableType
Verifies that the given type may be used with RequestFactory.- See Also:
-
maybeScanContext
-
maybeScanFactory
-
maybeScanProxy
-
mustResolveAllAnnotations
public boolean mustResolveAllAnnotations() -
poison
Emits a fatal error message attached to an element. If the element or an eclosing type is annotated withSkipInterfaceValidationthe message will be dropped. -
requireMapping
-
setClientOnly
public void setClientOnly(boolean clientOnly) Set totrueto indicate that only JVM-client support code needs to be generated. -
setMustResolveAllMappings
public void setMustResolveAllMappings(boolean requireAllMappings) Set totrueif it is an error for unresolved ProxyForName and ServiceName annotations to be left over. -
warn
Emits a warning message, unless the element or an enclosing element are annotated with a@SuppressWarnings("requestfactory"). -
respectAnnotations
boolean respectAnnotations()This switch allows the RfValidatorTest code to be worked on in the IDE without causing compilation failures.
-