org.objectledge.pico
Class SequenceParameter
java.lang.Object
org.objectledge.pico.SequenceParameter
- All Implemented Interfaces:
- org.picocontainer.Parameter
public class SequenceParameter
- extends Object
- implements org.picocontainer.Parameter
Allows hinting the component's constructor arguments of aggregated types.
Both Java arrays and java.util.Collection objects are supported.
The elements of the sequence are org.picocontainer.Parameter objects
- they may resolve to constants, component references, or nested sequences.
- Version:
- $Id: SequenceParameter.java,v 1.6 2005/07/07 08:30:04 zwierzem Exp $
- Author:
- rafal@caltha.pl
|
Constructor Summary |
SequenceParameter(org.picocontainer.Parameter[] elements,
Class implClass)
Creates a sequence parameter. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
elements
private org.picocontainer.Parameter[] elements
implClass
private Class implClass
SequenceParameter
public SequenceParameter(org.picocontainer.Parameter[] elements,
Class implClass)
- Creates a sequence parameter.
- Parameters:
elements - the sequence elements.implClass - collection implementation class, may be null.
resolveInstance
public Object resolveInstance(org.picocontainer.PicoContainer container,
org.picocontainer.ComponentAdapter adapter,
Class expectedType)
throws org.picocontainer.PicoInitializationException
-
- Specified by:
resolveInstance in interface org.picocontainer.Parameter
- Throws:
org.picocontainer.PicoInitializationException
isResolvable
public boolean isResolvable(org.picocontainer.PicoContainer container,
org.picocontainer.ComponentAdapter adapter,
Class expectedType)
-
- Specified by:
isResolvable in interface org.picocontainer.Parameter
verify
public void verify(org.picocontainer.PicoContainer container,
org.picocontainer.ComponentAdapter adapter,
Class expectedType)
throws org.picocontainer.PicoIntrospectionException
-
- Specified by:
verify in interface org.picocontainer.Parameter
- Throws:
org.picocontainer.PicoIntrospectionException
accept
public void accept(org.picocontainer.PicoVisitor visitor)
-
- Specified by:
accept in interface org.picocontainer.Parameter
getElementType
private Class getElementType(Class expectedType)
toArray
private Object toArray(Object[] source,
Class targetType)
toCollection
private Object toCollection(Object[] source,
Class targetType)
Copyright © 2003-2006 objectledge.org. All Rights Reserved.