public abstract static class Section.Builder<T extends Section.Builder<T>> extends Object
SectionLifecycle
L. Generated lifecycle classes
will expose a create() method to access a builder and will add methods to the builder to set
all the props defined in the GroupSectionSpec
/ DiffSectionSpec
. By default the
builder exposes a method that the parent can use to specify an key for its children. The key
should be set every time a parent might have more children with the same SectionLifecycle
.Modifier and Type | Field and Description |
---|---|
protected ResourceResolver |
mResourceResolver |
Constructor and Description |
---|
Builder() |
Modifier and Type | Method and Description |
---|---|
abstract Section |
build() |
protected static void |
checkArgs(int requiredPropsCount,
BitSet required,
String[] requiredPropsNames)
Checks that all the required props are supplied, and if not throws a useful exception
|
abstract T |
getThis() |
T |
handle(Handle handle) |
protected void |
init(SectionContext context,
Section section) |
T |
key(String key)
Sets the key of this
Section local to its parent. |
protected T |
loadingEventHandler(EventHandler<LoadingEvent> loadingEventHandler) |
protected void |
release() |
protected ResourceResolver mResourceResolver
protected void init(SectionContext context, Section section)
protected T loadingEventHandler(EventHandler<LoadingEvent> loadingEventHandler)
public abstract T getThis()
protected void release()
protected static void checkArgs(int requiredPropsCount, BitSet required, String[] requiredPropsNames)
requiredPropsCount
- expected number of propsrequired
- the bit set that identifies which props have been suppliedrequiredPropsNames
- the names of all props used for a useful error message