java.lang.Object
com.google.web.bindery.requestfactory.server.Resolver

class Resolver extends Object
Responsible for converting between domain and client entities. This class has a small amount of temporary state used to handle graph cycles and assignment of synthetic ids.
See Also:
  • Constructor Details

  • Method Details

    • index

      static int index(String path)
      Returns the trailing [n] index value from a path.
    • matchesPropertyRef

      static boolean matchesPropertyRef(Set<String> propertyRefs, String newPrefix)
      Returns true if the given prefix is one of the requested property references.
    • snipIndex

      static String snipIndex(String path)
      Removes the trailing [n] from a path.
    • resolveClientValue

      public Object resolveClientValue(Object domainValue, Type assignableTo, Set<String> propertyRefs)
      Given a domain object, return a value that can be encoded by the client.
      Parameters:
      domainValue - the domain object to be converted into a client-side value
      assignableTo - the type in the client to which the resolved value should be assignable. A value of null indicates that any resolution will suffice.
      propertyRefs - the property references requested by the client
    • resolveDomainValue

      public Object resolveDomainValue(Object maybeEntityProxy, boolean detectDeadEntities)
      Convert a client-side value into a domain value.
      Parameters:
      maybeEntityProxy - the client object to resolve
      detectDeadEntities - if true this method will throw a ReportableException containing a DeadEntityException if an EntityProxy cannot be resolved