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 Object
- implements Recipe
name
protected final String name
prototype
protected boolean prototype
AbstractRecipe
protected AbstractRecipe(String name)
getName
public 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 Object create()
throws org.osgi.service.blueprint.container.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:
org.osgi.service.blueprint.container.ComponentDefinitionException
internalCreate
protected abstract Object internalCreate()
throws org.osgi.service.blueprint.container.ComponentDefinitionException
- Throws:
org.osgi.service.blueprint.container.ComponentDefinitionException
addPartialObject
protected void addPartialObject(Object obj)
convert
protected Object convert(Object obj,
org.osgi.service.blueprint.container.ReifiedType type)
throws Exception
- Throws:
Exception
convert
protected Object convert(Object obj,
Type type)
throws Exception
- Throws:
Exception
loadClass
protected Class loadClass(String className)
loadType
protected org.osgi.service.blueprint.container.ReifiedType loadType(String typeName)
loadType
protected org.osgi.service.blueprint.container.ReifiedType loadType(String typeName,
ClassLoader fromClassLoader)
destroy
public void destroy(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 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 String toString()
- Overrides:
toString
in class Object
Copyright © 2009-2011 The Apache Software Foundation. All Rights Reserved.