org.apache.commons.clazz
Interface ClazzInstanceFactory

All Superinterfaces:
ClazzElement, ClazzFeature
All Known Implementing Classes:
BeanClazzConstructorInstanceFactory, BeanClazzInstanceFactory, ReflectedConstructorInstanceFactory, ReflectedMethodInstanceFactory

public interface ClazzInstanceFactory
extends ClazzFeature

An object resposible for allocating new instances of a Clazz.

Version:
$Id: ClazzInstanceFactory.java 155436 2005-02-26 13:17:48Z dirkv $
Author:
Dmitri Plotnikov

Method Summary
 String getName()
          Returns the name of the factory.
 Clazz[] getParameterClazzes()
          Returns the factory parameter types.
 String getSignature()
          Returns the signature of the factory in the format "factoryName(paramType1,...)", where "factoryName" may be empty.
 Object newInstance(Object[] parameters)
          Creates a new instance.
 
Methods inherited from interface org.apache.commons.clazz.ClazzFeature
getDeclaringClazz
 
Methods inherited from interface org.apache.commons.clazz.ClazzElement
getAttribute, getAttributes
 

Method Detail

newInstance

Object newInstance(Object[] parameters)
Creates a new instance.

Parameters:
parameters - is the list of parameters. It can be null if the factory takes no parameters.

getName

String getName()
Returns the name of the factory. May be null.


getParameterClazzes

Clazz[] getParameterClazzes()
Returns the factory parameter types.


getSignature

String getSignature()
Returns the signature of the factory in the format "factoryName(paramType1,...)", where "factoryName" may be empty.



Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.