Class AutoBeanVisitor
- java.lang.Object
-
- com.google.web.bindery.autobean.shared.AutoBeanVisitor
-
public class AutoBeanVisitor extends java.lang.ObjectAllows traversal of an AutoBean object graph.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceAutoBeanVisitor.CollectionPropertyContextA PropertyContext that describes the parameterization of the Collection being visited.static interfaceAutoBeanVisitor.ContextReserved for future expansion to avoid API breaks.static interfaceAutoBeanVisitor.MapPropertyContextA PropertyContext that describes the parameterization of the Map being visited.static classAutoBeanVisitor.ParameterizationVisitorThe ParameterizationVisitor provides access to more complete type information than a simple class literal can provide.static interfaceAutoBeanVisitor.PropertyContextAllows properties to be reset.
-
Constructor Summary
Constructors Constructor Description AutoBeanVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidendVisit(AutoBean<?> bean, AutoBeanVisitor.Context ctx)Called after visiting anAutoBean.voidendVisitCollectionProperty(java.lang.String propertyName, AutoBean<java.util.Collection<?>> value, AutoBeanVisitor.CollectionPropertyContext ctx)Called after visiting a reference property.voidendVisitMapProperty(java.lang.String propertyName, AutoBean<java.util.Map<?,?>> value, AutoBeanVisitor.MapPropertyContext ctx)Called after visiting a reference property.voidendVisitReferenceProperty(java.lang.String propertyName, AutoBean<?> value, AutoBeanVisitor.PropertyContext ctx)Called after visiting a reference property.voidendVisitValueProperty(java.lang.String propertyName, java.lang.Object value, AutoBeanVisitor.PropertyContext ctx)Called after visiting a value property.booleanvisit(AutoBean<?> bean, AutoBeanVisitor.Context ctx)Called when visiting anAutoBean.booleanvisitCollectionProperty(java.lang.String propertyName, AutoBean<java.util.Collection<?>> value, AutoBeanVisitor.CollectionPropertyContext ctx)Called every time, butvisit(AutoBean, Context)will be called for the value only the first time it is encountered.booleanvisitMapProperty(java.lang.String propertyName, AutoBean<java.util.Map<?,?>> value, AutoBeanVisitor.MapPropertyContext ctx)Called every time, butvisit(AutoBean, Context)will be called for the value only the first time it is encountered.booleanvisitReferenceProperty(java.lang.String propertyName, AutoBean<?> value, AutoBeanVisitor.PropertyContext ctx)Called every time, butvisit(AutoBean, Context)will be called for the value only the first time it is encountered.booleanvisitValueProperty(java.lang.String propertyName, java.lang.Object value, AutoBeanVisitor.PropertyContext ctx)TODO: document.
-
-
-
Method Detail
-
endVisit
public void endVisit(AutoBean<?> bean, AutoBeanVisitor.Context ctx)
Called after visiting anAutoBean.- Parameters:
bean- anAutoBeanctx- a Context
-
endVisitCollectionProperty
public void endVisitCollectionProperty(java.lang.String propertyName, AutoBean<java.util.Collection<?>> value, AutoBeanVisitor.CollectionPropertyContext ctx)Called after visiting a reference property.- Parameters:
propertyName- the property name, as a Stringvalue- the property valuectx- a PropertyContext
-
endVisitMapProperty
public void endVisitMapProperty(java.lang.String propertyName, AutoBean<java.util.Map<?,?>> value, AutoBeanVisitor.MapPropertyContext ctx)Called after visiting a reference property.- Parameters:
propertyName- the property name, as a Stringvalue- the property valuectx- a PropertyContext
-
endVisitReferenceProperty
public void endVisitReferenceProperty(java.lang.String propertyName, AutoBean<?> value, AutoBeanVisitor.PropertyContext ctx)Called after visiting a reference property.- Parameters:
propertyName- the property name, as a Stringvalue- the property valuectx- a PropertyContext
-
endVisitValueProperty
public void endVisitValueProperty(java.lang.String propertyName, java.lang.Object value, AutoBeanVisitor.PropertyContext ctx)Called after visiting a value property.- Parameters:
propertyName- the property name, as a Stringvalue- the property valuectx- a PropertyContext
-
visit
public boolean visit(AutoBean<?> bean, AutoBeanVisitor.Context ctx)
Called when visiting anAutoBean.- Parameters:
bean- anAutoBeanctx- a Context
-
visitCollectionProperty
public boolean visitCollectionProperty(java.lang.String propertyName, AutoBean<java.util.Collection<?>> value, AutoBeanVisitor.CollectionPropertyContext ctx)Called every time, butvisit(AutoBean, Context)will be called for the value only the first time it is encountered.- Parameters:
propertyName- the property name, as a Stringvalue- the property valuectx- a PropertyContext
-
visitMapProperty
public boolean visitMapProperty(java.lang.String propertyName, AutoBean<java.util.Map<?,?>> value, AutoBeanVisitor.MapPropertyContext ctx)Called every time, butvisit(AutoBean, Context)will be called for the value only the first time it is encountered.- Parameters:
propertyName- the property name, as a Stringvalue- the property valuectx- a PropertyContext
-
visitReferenceProperty
public boolean visitReferenceProperty(java.lang.String propertyName, AutoBean<?> value, AutoBeanVisitor.PropertyContext ctx)Called every time, butvisit(AutoBean, Context)will be called for the value only the first time it is encountered.- Parameters:
propertyName- the property name, as a Stringvalue- the property valuectx- a PropertyContext
-
visitValueProperty
public boolean visitValueProperty(java.lang.String propertyName, java.lang.Object value, AutoBeanVisitor.PropertyContext ctx)TODO: document.- Parameters:
propertyName- the property name, as a Stringvalue- the property valuectx- a PropertyContext
-
-