public abstract static class Section.Builder<L extends SectionLifecycle,T extends Section.Builder<L,T>> extends ResourceResolver
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
.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() |
protected void |
init(SectionContext context,
Section section) |
protected T |
key(String key)
Sets the key of this
Section local to his parent. |
protected T |
loadingEventHandler(EventHandler<LoadingEvent> loadingEventHandler) |
protected void |
release() |
dipsToPixels, init, resolveBoolAttr, resolveBoolRes, resolveColorAttr, resolveColorRes, resolveDimenOffsetAttr, resolveDimenOffsetRes, resolveDimenSizeAttr, resolveDimenSizeRes, resolveDrawableAttr, resolveDrawableRes, resolveFloatAttr, resolveFloatRes, resolveIntArrayAttr, resolveIntAttr, resolveIntegerArrayAttr, resolveIntegerArrayRes, resolveIntRes, resolveStringArrayAttr, resolveStringArrayRes, resolveStringAttr, resolveStringRes, resolveStringRes, sipsToPixels
protected void init(SectionContext context, Section section)
protected T loadingEventHandler(EventHandler<LoadingEvent> loadingEventHandler)
public abstract T getThis()
protected void release()
release
in class ResourceResolver
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