java.lang.Object
com.google.web.bindery.requestfactory.apt.State
Direct Known Subclasses:
State.ForTesting

class State extends Object
  • Field Details

  • Constructor Details

  • Method Details

    • viewAs

      static TypeMirror viewAs(DeclaredType desiredType, TypeMirror searchFrom, State state)
      Used to take a FooRequest extends Request<Foo> and find the Request<Foo> type.
    • addMapping

      public void addMapping(ExecutableElement clientMethod, ExecutableElement domainMethod)
      Add a mapping from a client method to a domain method.
    • addMapping

      public void addMapping(TypeElement clientType, TypeElement domainType)
      Add a mapping from a client type to a domain type.
    • checkExtraTypes

      public void checkExtraTypes(Element x)
      Check an element for an ExtraTypes annotation. Handles both methods and types.
    • debug

      public void debug(Element elt, String message, Object... args)
      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

      public DeclaredType findType(Class<?> clazz)
      Utility method to look up raw types from class literals.
    • getClientToDomainMap

      public Map<Element,Element> 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

      public boolean isMappingRequired(TypeElement element)
    • isPoisoned

      public boolean isPoisoned()
    • isTransportableType

      public boolean isTransportableType(TypeMirror asType)
      Verifies that the given type may be used with RequestFactory.
      See Also:
    • maybeScanContext

      public void maybeScanContext(TypeElement requestContext)
    • maybeScanFactory

      public void maybeScanFactory(TypeElement factoryType)
    • maybeScanProxy

      public void maybeScanProxy(TypeElement proxyType)
    • mustResolveAllAnnotations

      public boolean mustResolveAllAnnotations()
    • poison

      public void poison(Element elt, String message)
      Emits a fatal error message attached to an element. If the element or an eclosing type is annotated with SkipInterfaceValidation the message will be dropped.
    • requireMapping

      public void requireMapping(TypeElement interfaceElement)
    • setClientOnly

      public void setClientOnly(boolean clientOnly)
      Set to true to indicate that only JVM-client support code needs to be generated.
    • setMustResolveAllMappings

      public void setMustResolveAllMappings(boolean requireAllMappings)
      Set to true if it is an error for unresolved ProxyForName and ServiceName annotations to be left over.
    • warn

      public void warn(Element elt, String message)
      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.