Example usage for org.apache.commons.collections4 FactoryUtils instantiateFactory

List of usage examples for org.apache.commons.collections4 FactoryUtils instantiateFactory

Introduction

In this page you can find the example usage for org.apache.commons.collections4 FactoryUtils instantiateFactory.

Prototype

public static <T> Factory<T> instantiateFactory(final Class<T> classToInstantiate) 

Source Link

Document

Creates a Factory that can create objects of a specific type using a no-args constructor.

Usage

From source file:cz.muni.fi.editor.webapp.forms.factories.UserFormCreateFactory.java

@Override
public UserFormCreate getObject() throws Exception {
    UserFormCreate uf = new UserFormCreate();
    uf.setActive(Boolean.TRUE);//from   w  ww  . j  ava2  s . co m
    uf.setOrganizations(
            LazyList.lazyList(new ArrayList<>(), FactoryUtils.instantiateFactory(OrganizationForm.class)));

    return uf;
}

From source file:cz.muni.fi.editor.webapp.forms.factories.OrganizationFormFactory.java

@Override
public OrganizationForm getObject() throws Exception {
    OrganizationForm organizationForm = new OrganizationForm();

    organizationForm.setPermissions(/*from  w  w w.  jav  a 2 s.co  m*/
            LazyList.lazyList(new ArrayList<>(), FactoryUtils.instantiateFactory(UserPermissionForm.class)));

    return organizationForm;
}

From source file:cz.muni.fi.editor.webapp.forms.factories.UserFormProfileFactory.java

@Override
public UserFormProfile getObject() throws Exception {
    UserFormProfile uf = new UserFormProfile();
    uf.setActive(Boolean.TRUE);//from   ww w .j  a  v a2s  .com
    uf.setOrganizations(
            LazyList.lazyList(new ArrayList<>(), FactoryUtils.instantiateFactory(OrganizationForm.class)));

    return uf;
}