Class AutoBeanVisitor.ParameterizationVisitor

java.lang.Object
com.google.web.bindery.autobean.shared.AutoBeanVisitor.ParameterizationVisitor
Enclosing class:
AutoBeanVisitor

public static class AutoBeanVisitor.ParameterizationVisitor extends Object
The ParameterizationVisitor provides access to more complete type information than a simple class literal can provide.

The order of traversal reflects the declared parameterization of the property. For example, a Map<String, List<Foo>> would be traversed via the following sequence:

 visitType(Map.class);
   visitParameter();
     visitType(String.class);
     endVisitType(String.class);
   endVisitParameter();
   visitParameter();
     visitType(List.class);
       visitParameter();
         visitType(Foo.class);
         endVisitType(Foo.class);
       endParameter();
     endVisitType(List.class);
   endVisitParameter();
 endVisitType(Map.class);
 
  • Constructor Details

    • ParameterizationVisitor

      public ParameterizationVisitor()
  • Method Details

    • endVisitParameter

      public void endVisitParameter()
      Called when finished with a type parameter.
    • endVisitType

      public void endVisitType(Class<?> type)
      Called when finished with a type.
      Parameters:
      type - a Class object
    • visitParameter

      public boolean visitParameter()
      Called when visiting a type parameter.
      Returns:
      true if the type parameter should be visited
    • visitType

      public boolean visitType(Class<?> type)
      Called when visiting a possibly parameterized type.
      Parameters:
      type - a Class object
      Returns:
      true if the type should be visited