S
- Service type to be created by this factory.public class DefaultFactory<S extends Service> extends Object implements Factory<S>
Service
Factory
interface. This implementation uses ServiceCreator
class, which is a
generated class, to instantiate Service
object. Services created
this way are expected to support default constructor that is publicly
visible.AbstractModule.service(Class)
Constructor and Description |
---|
DefaultFactory(Class<S> klass) |
Modifier and Type | Method and Description |
---|---|
S |
create()
Creates an instance of the Service.
|
Class<S> |
getServiceClass()
Returns the class object representing the Service type of the object to
be created by this factory.
|
void |
onFactoryLoad()
Invoked by the framework just prior to calling
Factory.create() . |
public S create()
Factory
public Class<S> getServiceClass()
Factory
getServiceClass
in interface Factory<S extends Service>
public void onFactoryLoad()
Factory
Factory.create()
.onFactoryLoad
in interface Factory<S extends Service>
Copyright © 2016. All rights reserved.