org.apache.aries.blueprint.di
Class AbstractRecipe
java.lang.Object
org.apache.aries.blueprint.di.AbstractRecipe
- All Implemented Interfaces:
- Recipe
- Direct Known Subclasses:
- AbstractServiceReferenceRecipe, ArrayRecipe, BeanRecipe, CollectionRecipe, ComponentFactoryRecipe, IdRefRecipe, MapRecipe, PassThroughRecipe, RefRecipe, ServiceRecipe, ValueRecipe
public abstract class AbstractRecipe
- extends java.lang.Object
- implements Recipe
Field Summary |
protected java.lang.String |
name
|
protected boolean |
prototype
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
name
protected final java.lang.String name
prototype
protected boolean prototype
AbstractRecipe
protected AbstractRecipe(java.lang.String name)
getName
public java.lang.String getName()
- Description copied from interface:
Recipe
- Get the unique name for this recipe.
- Specified by:
getName
in interface Recipe
- Returns:
- the unique name for this recipe.
isPrototype
public boolean isPrototype()
setPrototype
public void setPrototype(boolean prototype)
create
public final java.lang.Object create()
throws ComponentDefinitionException
- Description copied from interface:
Recipe
- Create an instance for this recipe.
- Specified by:
create
in interface Recipe
- Returns:
- a new instance for this recipe
- Throws:
ComponentDefinitionException
internalCreate
protected abstract java.lang.Object internalCreate()
throws ComponentDefinitionException
- Throws:
ComponentDefinitionException
addPartialObject
protected void addPartialObject(java.lang.Object obj)
convert
protected java.lang.Object convert(java.lang.Object obj,
ReifiedType type)
throws java.lang.Exception
- Throws:
java.lang.Exception
convert
protected java.lang.Object convert(java.lang.Object obj,
java.lang.reflect.Type type)
throws java.lang.Exception
- Throws:
java.lang.Exception
loadClass
protected java.lang.Class loadClass(java.lang.String className)
loadType
protected ReifiedType loadType(java.lang.String typeName)
loadType
protected ReifiedType loadType(java.lang.String typeName,
java.lang.ClassLoader fromClassLoader)
destroy
public void destroy(java.lang.Object instance)
- Description copied from interface:
Recipe
- Destroy an instance created by this recipe
- Specified by:
destroy
in interface Recipe
- Parameters:
instance
- the instance to be destroyed
getConstructorDependencies
public java.util.List<Recipe> getConstructorDependencies()
- Description copied from interface:
Recipe
- Get the list of constructor dependencies, i.e. explicit and
argument dependencies. These dependencies must be satisfied
before the an object can be created.
- Specified by:
getConstructorDependencies
in interface Recipe
- Returns:
- a list of constructor dependencies
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.