| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.gwt.inject.rebind.util.MemberCollector
public class MemberCollector
This class can be used to collect a type's members, including those of its (recursive) superclasses and interfaces. The collector treats overrides correctly, i.e. it returns the method defined the closest to the provided type.
Note: The collector uses internal caching and can be called with the same arguments repeatedly without repeated performance costs.
This class is not thread-safe.
| Nested Class Summary | |
|---|---|
| static interface | MemberCollector.FieldFilterFilter used during the collection of fields to restrict the kind of collected fields. | 
| static interface | MemberCollector.MethodFilterFilter used during the collection of methods to restrict the kind of collected methods. | 
| Field Summary | |
|---|---|
| static MemberCollector.MethodFilter | ALL_METHOD_FILTER | 
| Constructor Summary | |
|---|---|
| MemberCollector(com.google.gwt.core.ext.TreeLogger logger) | |
| Method Summary | |
|---|---|
|  java.util.Collection<FieldLiteral<?>> | getFields(TypeLiteral<?> typeLiteral)Returns all fields in the provided type, including those of the type's (recursive) super classes. | 
|  java.util.Collection<MethodLiteral<?,java.lang.reflect.Method>> | getMethods(TypeLiteral<?> typeLiteral)Returns all methods in the provided type, including those of the type's (recursive) super classes and interfaces. | 
|  void | setFieldFilter(MemberCollector.FieldFilter filter)Sets this collector's field filter. | 
|  void | setMethodFilter(MemberCollector.MethodFilter filter)Sets this collector's method filter. | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
public static final MemberCollector.MethodFilter ALL_METHOD_FILTER
| Constructor Detail | 
|---|
@Inject public MemberCollector(com.google.gwt.core.ext.TreeLogger logger)
| Method Detail | 
|---|
public void setMethodFilter(MemberCollector.MethodFilter filter)
                     throws java.lang.IllegalStateException
filter - new method filter for this collector
java.lang.IllegalStateException - if the filter is set after members have been
    requested
public void setFieldFilter(MemberCollector.FieldFilter filter)
                    throws java.lang.IllegalStateException
filter - new field filter for this collector
java.lang.IllegalStateException - if the filter is set after members have been
    requestedpublic java.util.Collection<MethodLiteral<?,java.lang.reflect.Method>> getMethods(TypeLiteral<?> typeLiteral)
typeLiteral - type for which methods are collected
public java.util.Collection<FieldLiteral<?>> getFields(TypeLiteral<?> typeLiteral)
typeLiteral - type for which fields are collected
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||