Package org.apache.xbean.recipe
Class ObjectRecipe
java.lang.Object
org.apache.xbean.recipe.AbstractRecipe
org.apache.xbean.recipe.ObjectRecipe
- All Implemented Interfaces:
Serializable,Recipe
- Version:
- $Rev: 6688 $ $Date: 2005-12-29T02:08:29.200064Z $
- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic classstatic classstatic classstatic interfacestatic classstatic classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Stringprivate final LinkedHashMap<ObjectRecipe.Property, Object> private PropertyEditorRegistryprivate Classprivate String -
Constructor Summary
ConstructorsConstructorDescriptionObjectRecipe(Class typeClass) ObjectRecipe(Class typeClass, String factoryMethod) ObjectRecipe(Class typeClass, String[] constructorArgNames) ObjectRecipe(Class typeClass, String[] constructorArgNames, Class[] constructorArgTypes) ObjectRecipe(Class type, String factoryMethod, String[] constructorArgNames) ObjectRecipe(Class type, String factoryMethod, String[] constructorArgNames, Class[] constructorArgTypes) ObjectRecipe(Class typeClass, String factoryMethod, String[] constructorArgNames, Class[] constructorArgTypes, Map<String, Object> properties) ObjectRecipe(Class typeClass, Map<String, Object> properties) ObjectRecipe(String typeName) ObjectRecipe(String typeName, String factoryMethod) ObjectRecipe(String typeName, String[] constructorArgNames) ObjectRecipe(String typeName, String[] constructorArgNames, Class[] constructorArgTypes) ObjectRecipe(String typeName, String factoryMethod, String[] constructorArgNames) ObjectRecipe(String typeName, String factoryMethod, String[] constructorArgNames, Class[] constructorArgTypes) ObjectRecipe(String typeName, String factoryMethod, String[] constructorArgNames, Class[] constructorArgTypes, Map<String, Object> properties) ObjectRecipe(String typeName, Map<String, Object> properties) -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleanvoidprivate Object[]extractConstructorArgs(Map propertyValues, ReflectionUtil.Factory factory) private ReflectionUtil.FactoryfindFactory(Type expectedType) private static ObjectgetDefaultValue(Class type) getProperty(String name) getType()protected ObjectinternalCreate(Type expectedType, boolean lazyRefAllowed) voidsetAllProperties(Map<?, ?> map) voidsetAutoMatchProperty(String type, Object value) voidsetCompoundProperty(String name, Object value) voidsetConstructorArgNames(String[] constructorArgNames) voidsetConstructorArgNames(List<String> constructorArgNames) voidsetConstructorArgTypes(Class[] constructorArgTypes) voidsetConstructorArgTypes(List<? extends Class<?>> constructorArgTypes) voidsetFactoryMethod(String factoryMethod) voidsetFieldProperty(String name, Object value) voidsetMethodProperty(String name, Object value) voidsetProperties(Object instance) private voidsetProperties(Map<ObjectRecipe.Property, Object> propertyValues, Object instance, Class clazz) private voidsetProperty(Object instance, Class clazz, ObjectRecipe.Property propertyName, Object propertyValue) voidsetProperty(String name, Object value) private voidsetProperty(ObjectRecipe.Property key, Object value) voidsetRegistry(PropertyEditorRegistry registry) Methods inherited from class org.apache.xbean.recipe.AbstractRecipe
create, create, create, getName, getPriority, setName, toString
-
Field Details
-
typeName
-
typeClass
-
factoryMethod
-
constructorArgNames
-
constructorArgTypes
-
registry
-
properties
-
options
-
unsetProperties
-
-
Constructor Details
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
ObjectRecipe
-
-
Method Details
-
allow
-
disallow
-
getOptions
-
getConstructorArgNames
-
setConstructorArgNames
-
setConstructorArgNames
-
getConstructorArgTypes
-
setConstructorArgTypes
-
setConstructorArgTypes
-
getFactoryMethod
-
setFactoryMethod
-
getProperty
-
getProperties
-
setProperty
-
setFieldProperty
-
setMethodProperty
-
setAutoMatchProperty
-
setCompoundProperty
-
setProperty
-
setAllProperties
-
getUnsetProperties
-
getNestedRecipes
- Specified by:
getNestedRecipesin interfaceRecipe- Overrides:
getNestedRecipesin classAbstractRecipe
-
getConstructorRecipes
- Specified by:
getConstructorRecipesin interfaceRecipe- Overrides:
getConstructorRecipesin classAbstractRecipe
-
canCreate
-
internalCreate
protected Object internalCreate(Type expectedType, boolean lazyRefAllowed) throws ConstructionException - Specified by:
internalCreatein classAbstractRecipe- Throws:
ConstructionException
-
setProperties
- Throws:
ConstructionException
-
setStaticProperties
- Throws:
ConstructionException
-
getType
-
setRegistry
-
setProperties
private void setProperties(Map<ObjectRecipe.Property, Object> propertyValues, Object instance, Class clazz) -
setProperty
private void setProperty(Object instance, Class clazz, ObjectRecipe.Property propertyName, Object propertyValue) -
findFactory
-
extractConstructorArgs
-
getDefaultValue
-