org.apache.avalon.composition.model.impl
Class DefaultConstructorModel

java.lang.Object
  extended byorg.apache.avalon.composition.model.impl.DefaultEntryModel
      extended byorg.apache.avalon.composition.model.impl.DefaultConstructorModel
All Implemented Interfaces:
EntryModel

public class DefaultConstructorModel
extends DefaultEntryModel

Default implementation of a the context entry constructor model.

Version:
$Revision: 1.1.1.2 $ $Date: 2004/05/19 09:33:01 $
Author:
Avalon Development Team

Constructor Summary
DefaultConstructorModel(EntryDescriptor descriptor, ConstructorDirective directive, ComponentContext context, Map map)
          Creation of a new context entry import model.
 
Method Summary
 Object getValue()
          Return the context entry value.
 Object getValue(ClassLoader loader, Class clazz, String argument, Parameter[] parameters)
          Return the derived parameter value.
 Object getValue(Parameter p)
          Return the context entry value.
 
Methods inherited from class org.apache.avalon.composition.model.impl.DefaultEntryModel
getKey
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultConstructorModel

public DefaultConstructorModel(EntryDescriptor descriptor,
                               ConstructorDirective directive,
                               ComponentContext context,
                               Map map)
                        throws ModelException
Creation of a new context entry import model.

Parameters:
descriptor - the context entry descriptor
directive - the context entry directive
context - the containment context
map - a map of available context entries
Method Detail

getValue

public Object getValue()
                throws ModelException
Return the context entry value.

Specified by:
getValue in interface EntryModel
Specified by:
getValue in class DefaultEntryModel
Returns:
the context entry value
Throws:
ModelException

getValue

public Object getValue(Parameter p)
                throws ModelException
Return the context entry value.

Returns:
the context entry value
Throws:
ModelException

getValue

public Object getValue(ClassLoader loader,
                       Class clazz,
                       String argument,
                       Parameter[] parameters)
                throws ModelException
Return the derived parameter value.

Parameters:
loader - the classloader to use
clazz - the constructor class
argument - a single string constructor argument
parameters - an alternative sequence of arguments
Returns:
the value
Throws:
ModelException - if the parameter value cannot be resolved


Copyright © The Apache Software Foundation. All Rights Reserved.