Class AutoBeanVisitor

java.lang.Object
com.google.web.bindery.autobean.shared.AutoBeanVisitor

public class AutoBeanVisitor extends Object
Allows traversal of an AutoBean object graph.
  • Constructor Details

    • AutoBeanVisitor

      public AutoBeanVisitor()
  • Method Details

    • endVisit

      public void endVisit(AutoBean<?> bean, AutoBeanVisitor.Context ctx)
      Called after visiting an AutoBean.
      Parameters:
      bean - an AutoBean
      ctx - a Context
    • endVisitCollectionProperty

      public void endVisitCollectionProperty(String propertyName, AutoBean<Collection<?>> value, AutoBeanVisitor.CollectionPropertyContext ctx)
      Called after visiting a reference property.
      Parameters:
      propertyName - the property name, as a String
      value - the property value
      ctx - a PropertyContext
    • endVisitMapProperty

      public void endVisitMapProperty(String propertyName, AutoBean<Map<?,?>> value, AutoBeanVisitor.MapPropertyContext ctx)
      Called after visiting a reference property.
      Parameters:
      propertyName - the property name, as a String
      value - the property value
      ctx - a PropertyContext
    • endVisitReferenceProperty

      public void endVisitReferenceProperty(String propertyName, AutoBean<?> value, AutoBeanVisitor.PropertyContext ctx)
      Called after visiting a reference property.
      Parameters:
      propertyName - the property name, as a String
      value - the property value
      ctx - a PropertyContext
    • endVisitValueProperty

      public void endVisitValueProperty(String propertyName, Object value, AutoBeanVisitor.PropertyContext ctx)
      Called after visiting a value property.
      Parameters:
      propertyName - the property name, as a String
      value - the property value
      ctx - a PropertyContext
    • visit

      public boolean visit(AutoBean<?> bean, AutoBeanVisitor.Context ctx)
      Called when visiting an AutoBean.
      Parameters:
      bean - an AutoBean
      ctx - a Context
    • visitCollectionProperty

      public boolean visitCollectionProperty(String propertyName, AutoBean<Collection<?>> value, AutoBeanVisitor.CollectionPropertyContext ctx)
      Called every time, but visit(AutoBean, Context) will be called for the value only the first time it is encountered.
      Parameters:
      propertyName - the property name, as a String
      value - the property value
      ctx - a PropertyContext
    • visitMapProperty

      public boolean visitMapProperty(String propertyName, AutoBean<Map<?,?>> value, AutoBeanVisitor.MapPropertyContext ctx)
      Called every time, but visit(AutoBean, Context) will be called for the value only the first time it is encountered.
      Parameters:
      propertyName - the property name, as a String
      value - the property value
      ctx - a PropertyContext
    • visitReferenceProperty

      public boolean visitReferenceProperty(String propertyName, AutoBean<?> value, AutoBeanVisitor.PropertyContext ctx)
      Called every time, but visit(AutoBean, Context) will be called for the value only the first time it is encountered.
      Parameters:
      propertyName - the property name, as a String
      value - the property value
      ctx - a PropertyContext
    • visitValueProperty

      public boolean visitValueProperty(String propertyName, Object value, AutoBeanVisitor.PropertyContext ctx)
      TODO: document.
      Parameters:
      propertyName - the property name, as a String
      value - the property value
      ctx - a PropertyContext