de.smartics.properties.resource.util
Interface InstanceCreator<T>

Package class diagram package InstanceCreator
All Known Implementing Classes:
DummyInstanceCreator

public interface InstanceCreator<T>

Interface to create instances for the service factory.


Method Summary
 T create()
          Creates the instance.
 Class<T> getType()
          Returns the type this creator creates instances for.
 

Method Detail

getType

Class<T> getType()
Returns the type this creator creates instances for. The type is a generic type, the instance creator usually creates more specific types than this type indicates.

Returns:
the type of the created instances.

create

@CheckForNull
T create()
         throws ResourceException
Creates the instance.

Returns:
the created instance. May be null if there is not enough information to create an instance.
Throws:
ResourceException - on any technical problem encountered while creating the instance.


Copyright © 2012-2013 Kronseder & Reiner GmbH - smartics. All Rights Reserved.