Interface InstantiatingReflector

All Superinterfaces:
net.sf.composite.Component, Reflector
All Known Implementing Classes:
ArrayReflector, CollectionReflector, ContextReflector, ListReflector, MapReflector, ObjectReflector, ServletRequestReflector, SetReflector, SimpleDelegatingReflector, SimpleInstantiatingReflector, SortedSetReflector, StubbornDelegatingReflector

public interface InstantiatingReflector
extends Reflector

A reflector that can instantiate objects. This allows the reflector to pick implementations for interfaces, instantiate arrays, etc. Only classes that are reflectable by this reflector should be instantiable.

This reflector is designed to facilitate construction of both simple objects and objects that do not offer no-argument constructors.

Nov 27, 2004
Matt Sgarlata

Method Summary
 java.lang.Object newInstance(java.lang.Class clazz, java.lang.Object parameters)
          Creates a new instance of the given type.
Methods inherited from interface net.sf.morph.reflect.Reflector
getReflectableClasses, getWrapper

Method Detail


java.lang.Object newInstance(java.lang.Class clazz,
                             java.lang.Object parameters)
                             throws ReflectionException
Creates a new instance of the given type.

clazz - the type for which we would like a new instance to be created
parameters - additional information that may be necessary for the implementation to create the required object (this may be null if the implementation does not require additional information or the particular object being requested does not require additional information)
ReflectionException - if an error occurs

Copyright © 2004-2008.