Package org.apache.xbean.recipe
Class ObjectRecipe
- java.lang.Object
-
- org.apache.xbean.recipe.AbstractRecipe
-
- org.apache.xbean.recipe.ObjectRecipe
-
- All Implemented Interfaces:
java.io.Serializable,Recipe
public class ObjectRecipe extends AbstractRecipe
- Version:
- $Rev: 6688 $ $Date: 2005-12-29T02:08:29.200064Z $
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classObjectRecipe.AutoMatchPropertystatic classObjectRecipe.CompoundPropertystatic classObjectRecipe.FieldMemberstatic classObjectRecipe.FieldPropertystatic interfaceObjectRecipe.Memberstatic classObjectRecipe.MethodMemberstatic classObjectRecipe.Propertystatic classObjectRecipe.SetterProperty
-
Constructor Summary
Constructors Constructor Description ObjectRecipe(java.lang.Class typeClass)ObjectRecipe(java.lang.Class typeClass, java.lang.String factoryMethod)ObjectRecipe(java.lang.Class typeClass, java.lang.String[] constructorArgNames)ObjectRecipe(java.lang.Class typeClass, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)ObjectRecipe(java.lang.Class type, java.lang.String factoryMethod, java.lang.String[] constructorArgNames)ObjectRecipe(java.lang.Class type, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)ObjectRecipe(java.lang.Class typeClass, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes, java.util.Map<java.lang.String,java.lang.Object> properties)ObjectRecipe(java.lang.Class typeClass, java.util.Map<java.lang.String,java.lang.Object> properties)ObjectRecipe(java.lang.String typeName)ObjectRecipe(java.lang.String typeName, java.lang.String factoryMethod)ObjectRecipe(java.lang.String typeName, java.lang.String[] constructorArgNames)ObjectRecipe(java.lang.String typeName, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)ObjectRecipe(java.lang.String typeName, java.lang.String factoryMethod, java.lang.String[] constructorArgNames)ObjectRecipe(java.lang.String typeName, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)ObjectRecipe(java.lang.String typeName, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes, java.util.Map<java.lang.String,java.lang.Object> properties)ObjectRecipe(java.lang.String typeName, java.util.Map<java.lang.String,java.lang.Object> properties)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidallow(Option option)booleancanCreate(java.lang.reflect.Type type)voiddisallow(Option option)java.util.List<java.lang.String>getConstructorArgNames()java.util.List<java.lang.Class<?>>getConstructorArgTypes()java.util.List<Recipe>getConstructorRecipes()java.lang.StringgetFactoryMethod()java.util.List<Recipe>getNestedRecipes()java.util.Set<Option>getOptions()java.util.Map<java.lang.String,java.lang.Object>getProperties()java.lang.ObjectgetProperty(java.lang.String name)java.lang.ClassgetType()java.util.Map<java.lang.String,java.lang.Object>getUnsetProperties()protected java.lang.ObjectinternalCreate(java.lang.reflect.Type expectedType, boolean lazyRefAllowed)voidsetAllProperties(java.util.Map<?,?> map)voidsetAutoMatchProperty(java.lang.String type, java.lang.Object value)voidsetCompoundProperty(java.lang.String name, java.lang.Object value)voidsetConstructorArgNames(java.lang.String[] constructorArgNames)voidsetConstructorArgNames(java.util.List<java.lang.String> constructorArgNames)voidsetConstructorArgTypes(java.lang.Class[] constructorArgTypes)voidsetConstructorArgTypes(java.util.List<? extends java.lang.Class<?>> constructorArgTypes)voidsetFactoryMethod(java.lang.String factoryMethod)voidsetFieldProperty(java.lang.String name, java.lang.Object value)voidsetMethodProperty(java.lang.String name, java.lang.Object value)voidsetProperties(java.lang.Object instance)voidsetProperty(java.lang.String name, java.lang.Object value)voidsetRegistry(PropertyEditorRegistry registry)java.lang.ClasssetStaticProperties()-
Methods inherited from class org.apache.xbean.recipe.AbstractRecipe
create, create, create, getName, getPriority, setName, toString
-
-
-
-
Constructor Detail
-
ObjectRecipe
public ObjectRecipe(java.lang.Class typeClass)
-
ObjectRecipe
public ObjectRecipe(java.lang.Class typeClass, java.lang.String factoryMethod)
-
ObjectRecipe
public ObjectRecipe(java.lang.Class typeClass, java.util.Map<java.lang.String,java.lang.Object> properties)
-
ObjectRecipe
public ObjectRecipe(java.lang.Class typeClass, java.lang.String[] constructorArgNames)
-
ObjectRecipe
public ObjectRecipe(java.lang.Class typeClass, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)
-
ObjectRecipe
public ObjectRecipe(java.lang.Class type, java.lang.String factoryMethod, java.lang.String[] constructorArgNames)
-
ObjectRecipe
public ObjectRecipe(java.lang.Class type, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)
-
ObjectRecipe
public ObjectRecipe(java.lang.Class typeClass, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes, java.util.Map<java.lang.String,java.lang.Object> properties)
-
ObjectRecipe
public ObjectRecipe(java.lang.String typeName)
-
ObjectRecipe
public ObjectRecipe(java.lang.String typeName, java.lang.String factoryMethod)
-
ObjectRecipe
public ObjectRecipe(java.lang.String typeName, java.util.Map<java.lang.String,java.lang.Object> properties)
-
ObjectRecipe
public ObjectRecipe(java.lang.String typeName, java.lang.String[] constructorArgNames)
-
ObjectRecipe
public ObjectRecipe(java.lang.String typeName, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)
-
ObjectRecipe
public ObjectRecipe(java.lang.String typeName, java.lang.String factoryMethod, java.lang.String[] constructorArgNames)
-
ObjectRecipe
public ObjectRecipe(java.lang.String typeName, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)
-
ObjectRecipe
public ObjectRecipe(java.lang.String typeName, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes, java.util.Map<java.lang.String,java.lang.Object> properties)
-
-
Method Detail
-
getOptions
public java.util.Set<Option> getOptions()
-
getConstructorArgNames
public java.util.List<java.lang.String> getConstructorArgNames()
-
setConstructorArgNames
public void setConstructorArgNames(java.lang.String[] constructorArgNames)
-
setConstructorArgNames
public void setConstructorArgNames(java.util.List<java.lang.String> constructorArgNames)
-
getConstructorArgTypes
public java.util.List<java.lang.Class<?>> getConstructorArgTypes()
-
setConstructorArgTypes
public void setConstructorArgTypes(java.lang.Class[] constructorArgTypes)
-
setConstructorArgTypes
public void setConstructorArgTypes(java.util.List<? extends java.lang.Class<?>> constructorArgTypes)
-
getFactoryMethod
public java.lang.String getFactoryMethod()
-
setFactoryMethod
public void setFactoryMethod(java.lang.String factoryMethod)
-
getProperty
public java.lang.Object getProperty(java.lang.String name)
-
getProperties
public java.util.Map<java.lang.String,java.lang.Object> getProperties()
-
setProperty
public void setProperty(java.lang.String name, java.lang.Object value)
-
setFieldProperty
public void setFieldProperty(java.lang.String name, java.lang.Object value)
-
setMethodProperty
public void setMethodProperty(java.lang.String name, java.lang.Object value)
-
setAutoMatchProperty
public void setAutoMatchProperty(java.lang.String type, java.lang.Object value)
-
setCompoundProperty
public void setCompoundProperty(java.lang.String name, java.lang.Object value)
-
setAllProperties
public void setAllProperties(java.util.Map<?,?> map)
-
getUnsetProperties
public java.util.Map<java.lang.String,java.lang.Object> getUnsetProperties()
-
getNestedRecipes
public java.util.List<Recipe> getNestedRecipes()
- Specified by:
getNestedRecipesin interfaceRecipe- Overrides:
getNestedRecipesin classAbstractRecipe
-
getConstructorRecipes
public java.util.List<Recipe> getConstructorRecipes()
- Specified by:
getConstructorRecipesin interfaceRecipe- Overrides:
getConstructorRecipesin classAbstractRecipe
-
canCreate
public boolean canCreate(java.lang.reflect.Type type)
-
internalCreate
protected java.lang.Object internalCreate(java.lang.reflect.Type expectedType, boolean lazyRefAllowed) throws ConstructionException
- Specified by:
internalCreatein classAbstractRecipe- Throws:
ConstructionException
-
setProperties
public void setProperties(java.lang.Object instance) throws ConstructionException
- Throws:
ConstructionException
-
setStaticProperties
public java.lang.Class setStaticProperties() throws ConstructionException
- Throws:
ConstructionException
-
getType
public java.lang.Class getType()
-
setRegistry
public void setRegistry(PropertyEditorRegistry registry)
-
-