public final class FragmentFactory extends Object
Constructor and Description |
---|
FragmentFactory() |
Modifier and Type | Method and Description |
---|---|
static EditableTemplateFragment<?> |
newEditableTemplateFragment()
Returns a new
EditableTemplateFragment instance. |
static ElementFragment<?> |
newElementFragment()
Returns a new
ElementFragment instance. |
static <F extends Fragment> |
newFragmentList()
Returns an empty list typed for fragments.
|
static List<EditableTemplateFragment<?>> |
newFragmentList(int initialSize, EditableTemplateFragment<?> prototype)
Returns a list of the specified size populated with fragments prototyped on the editable template fragment specified by
prototype . |
static SiteEntryFragment<?> |
newSiteEntryFragment()
Returns a new
SiteEntryFragment instance. |
static TemplateFragment<?> |
newTemplateFragment()
Returns a new
TemplateFragment instance. |
public static TemplateFragment<?> newTemplateFragment()
TemplateFragment
instance.public static EditableTemplateFragment<?> newEditableTemplateFragment()
EditableTemplateFragment
instance.public static SiteEntryFragment<?> newSiteEntryFragment()
SiteEntryFragment
instance.public static ElementFragment<?> newElementFragment()
ElementFragment
instance.public static <F extends Fragment> List<F> newFragmentList()
F
- a subclass of Fragmentpublic static List<EditableTemplateFragment<?>> newFragmentList(int initialSize, EditableTemplateFragment<?> prototype)
prototype
.
Note: Currently fragment list initialization only supports prototypes built from the default implementation which can be instantiated using FragmentFactory.newEditableTemplateFragment()
.
initialSize
- the initial size of the list; negative or zero values will create an empty list.prototype
- the prototype based on which the fragments are created and populated into the list, should not be null
.