Class State
java.lang.Object
com.google.web.bindery.requestfactory.apt.State
- Direct Known Subclasses:
State.ForTesting
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
Slightly tweaked implementation used when running tests. -
Field Summary
Modifier 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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addMapping
(ExecutableElement clientMethod, ExecutableElement domainMethod) Add a mapping from a client method to a domain method.void
addMapping
(TypeElement clientType, TypeElement domainType) Add a mapping from a client type to a domain type.void
Check an element for anExtraTypes
annotation.void
Print a warning message if verbose mode is enabled.void
Utility method to look up raw types from class literals.Returns a map of client elements to their domain counterparts.boolean
boolean
isMappingRequired
(TypeElement element) boolean
boolean
isTransportableType
(TypeMirror asType) Verifies that the given type may be used with RequestFactory.void
maybeScanContext
(TypeElement requestContext) void
maybeScanFactory
(TypeElement factoryType) void
maybeScanProxy
(TypeElement proxyType) boolean
void
Emits a fatal error message attached to an element.void
requireMapping
(TypeElement interfaceElement) (package private) boolean
This switch allows the RfValidatorTest code to be worked on in the IDE without causing compilation failures.void
setClientOnly
(boolean clientOnly) Set totrue
to indicate that only JVM-client support code needs to be generated.void
setMustResolveAllMappings
(boolean requireAllMappings) Set totrue
if it is an error for unresolved ProxyForName and ServiceName annotations to be left over.(package private) static TypeMirror
viewAs
(DeclaredType desiredType, TypeMirror searchFrom, State state) Used to take aFooRequest extends Request<Foo>
and find theRequest<Foo>
type.void
Emits 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 anExtraTypes
annotation. 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 withSkipInterfaceValidation
the message will be dropped. -
requireMapping
-
setClientOnly
public void setClientOnly(boolean clientOnly) Set totrue
to indicate that only JVM-client support code needs to be generated. -
setMustResolveAllMappings
public void setMustResolveAllMappings(boolean requireAllMappings) Set totrue
if 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.
-