class State
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
(package private) static class |
State.ForTesting
Slightly tweaked implementation used when running tests.
|
Modifier and Type | Field and Description |
---|---|
(package private) javax.lang.model.type.TypeMirror |
baseProxyType |
(package private) javax.lang.model.util.Elements |
elements |
(package private) javax.lang.model.type.DeclaredType |
entityProxyIdType |
(package private) javax.lang.model.type.DeclaredType |
entityProxyType |
(package private) javax.lang.model.type.DeclaredType |
extraTypesAnnotation |
(package private) javax.annotation.processing.Filer |
filer |
(package private) javax.lang.model.type.DeclaredType |
instanceRequestType |
(package private) javax.lang.model.type.DeclaredType |
locatorType |
(package private) javax.lang.model.type.DeclaredType |
objectType |
(package private) javax.lang.model.type.DeclaredType |
requestContextType |
(package private) javax.lang.model.type.DeclaredType |
requestFactoryType |
(package private) javax.lang.model.type.DeclaredType |
requestType |
(package private) java.util.Set<javax.lang.model.element.TypeElement> |
seen |
(package private) javax.lang.model.type.DeclaredType |
serviceLocatorType |
(package private) javax.lang.model.util.Types |
types |
(package private) javax.lang.model.type.DeclaredType |
valueProxyType |
Constructor and Description |
---|
State(javax.annotation.processing.ProcessingEnvironment processingEnv) |
Modifier and Type | Method and Description |
---|---|
void |
addMapping(javax.lang.model.element.ExecutableElement clientMethod,
javax.lang.model.element.ExecutableElement domainMethod)
Add a mapping from a client method to a domain method.
|
void |
addMapping(javax.lang.model.element.TypeElement clientType,
javax.lang.model.element.TypeElement domainType)
Add a mapping from a client type to a domain type.
|
void |
checkExtraTypes(javax.lang.model.element.Element x)
Check an element for an
ExtraTypes annotation. |
void |
debug(javax.lang.model.element.Element elt,
java.lang.String message,
java.lang.Object... args)
Print a warning message if verbose mode is enabled.
|
void |
executeJobs() |
javax.lang.model.type.DeclaredType |
findType(java.lang.Class<?> clazz)
Utility method to look up raw types from class literals.
|
java.util.Map<javax.lang.model.element.Element,javax.lang.model.element.Element> |
getClientToDomainMap()
Returns a map of client elements to their domain counterparts.
|
boolean |
isClientOnly() |
boolean |
isMappingRequired(javax.lang.model.element.TypeElement element) |
boolean |
isPoisoned() |
boolean |
isTransportableType(javax.lang.model.type.TypeMirror asType)
Verifies that the given type may be used with RequestFactory.
|
void |
maybeScanContext(javax.lang.model.element.TypeElement requestContext) |
void |
maybeScanFactory(javax.lang.model.element.TypeElement factoryType) |
void |
maybeScanProxy(javax.lang.model.element.TypeElement proxyType) |
boolean |
mustResolveAllAnnotations() |
void |
poison(javax.lang.model.element.Element elt,
java.lang.String message)
Emits a fatal error message attached to an element.
|
void |
requireMapping(javax.lang.model.element.TypeElement interfaceElement) |
(package private) boolean |
respectAnnotations()
This switch allows the RfValidatorTest code to be worked on in the IDE
without causing compilation failures.
|
void |
setClientOnly(boolean clientOnly)
Set to
true to indicate that only JVM-client support code needs to
be generated. |
void |
setMustResolveAllMappings(boolean requireAllMappings)
Set to
true if it is an error for unresolved ProxyForName and
ServiceName annotations to be left over. |
(package private) static javax.lang.model.type.TypeMirror |
viewAs(javax.lang.model.type.DeclaredType desiredType,
javax.lang.model.type.TypeMirror searchFrom,
State state)
Used to take a
FooRequest extends Request<Foo> and find the
Request<Foo> type. |
void |
warn(javax.lang.model.element.Element elt,
java.lang.String message)
Emits a warning message, unless the element or an enclosing element are
annotated with a
@SuppressWarnings("requestfactory") . |
final javax.lang.model.type.TypeMirror baseProxyType
final javax.lang.model.util.Elements elements
final javax.lang.model.type.DeclaredType entityProxyIdType
final javax.lang.model.type.DeclaredType entityProxyType
final javax.lang.model.type.DeclaredType extraTypesAnnotation
final javax.annotation.processing.Filer filer
final javax.lang.model.type.DeclaredType instanceRequestType
final javax.lang.model.type.DeclaredType locatorType
final javax.lang.model.type.DeclaredType objectType
final javax.lang.model.type.DeclaredType requestContextType
final javax.lang.model.type.DeclaredType requestFactoryType
final javax.lang.model.type.DeclaredType requestType
final javax.lang.model.type.DeclaredType serviceLocatorType
final java.util.Set<javax.lang.model.element.TypeElement> seen
final javax.lang.model.util.Types types
final javax.lang.model.type.DeclaredType valueProxyType
public State(javax.annotation.processing.ProcessingEnvironment processingEnv)
static javax.lang.model.type.TypeMirror viewAs(javax.lang.model.type.DeclaredType desiredType, javax.lang.model.type.TypeMirror searchFrom, State state)
FooRequest extends Request<Foo>
and find the
Request<Foo>
type.public void addMapping(javax.lang.model.element.ExecutableElement clientMethod, javax.lang.model.element.ExecutableElement domainMethod)
public void addMapping(javax.lang.model.element.TypeElement clientType, javax.lang.model.element.TypeElement domainType)
public void checkExtraTypes(javax.lang.model.element.Element x)
ExtraTypes
annotation. Handles both methods
and types.public void debug(javax.lang.model.element.Element elt, java.lang.String message, java.lang.Object... args)
public void executeJobs()
public javax.lang.model.type.DeclaredType findType(java.lang.Class<?> clazz)
public java.util.Map<javax.lang.model.element.Element,javax.lang.model.element.Element> getClientToDomainMap()
public boolean isClientOnly()
public boolean isMappingRequired(javax.lang.model.element.TypeElement element)
public boolean isPoisoned()
public boolean isTransportableType(javax.lang.model.type.TypeMirror asType)
TransportableTypeVisitor
public void maybeScanContext(javax.lang.model.element.TypeElement requestContext)
public void maybeScanFactory(javax.lang.model.element.TypeElement factoryType)
public void maybeScanProxy(javax.lang.model.element.TypeElement proxyType)
public boolean mustResolveAllAnnotations()
public void poison(javax.lang.model.element.Element elt, java.lang.String message)
SkipInterfaceValidation
the message
will be dropped.public void requireMapping(javax.lang.model.element.TypeElement interfaceElement)
public void setClientOnly(boolean clientOnly)
true
to indicate that only JVM-client support code needs to
be generated.public void setMustResolveAllMappings(boolean requireAllMappings)
true
if it is an error for unresolved ProxyForName and
ServiceName annotations to be left over.public void warn(javax.lang.model.element.Element elt, java.lang.String message)
@SuppressWarnings("requestfactory")
.boolean respectAnnotations()