public class MemberCollector
extends java.lang.Object
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.
| Modifier and Type | Class and Description |
|---|---|
static interface |
MemberCollector.FieldFilter
Filter used during the collection of fields to restrict the kind of
collected fields.
|
static interface |
MemberCollector.MethodFilter
Filter used during the collection of methods to restrict the kind of
collected methods.
|
| Modifier and Type | Field and Description |
|---|---|
static MemberCollector.MethodFilter |
ALL_METHOD_FILTER |
| Constructor and Description |
|---|
MemberCollector(com.google.gwt.core.ext.TreeLogger logger) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
public static final MemberCollector.MethodFilter ALL_METHOD_FILTER
@Inject public MemberCollector(com.google.gwt.core.ext.TreeLogger logger)
public void setMethodFilter(MemberCollector.MethodFilter filter) throws java.lang.IllegalStateException
filter - new method filter for this collectorjava.lang.IllegalStateException - if the filter is set after members have been
requestedpublic void setFieldFilter(MemberCollector.FieldFilter filter) throws java.lang.IllegalStateException
filter - new field filter for this collectorjava.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 collectedpublic java.util.Collection<FieldLiteral<?>> getFields(TypeLiteral<?> typeLiteral)
typeLiteral - type for which fields are collected