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 class
static class
static class
static class
static interface
static class
static class
static class
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
private final LinkedHashMap<ObjectRecipe.Property,
Object> private PropertyEditorRegistry
private Class
private 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 TypeMethodDescriptionvoid
boolean
void
private Object[]
extractConstructorArgs
(Map propertyValues, ReflectionUtil.Factory factory) private ReflectionUtil.Factory
findFactory
(Type expectedType) private static Object
getDefaultValue
(Class type) getProperty
(String name) getType()
protected Object
internalCreate
(Type expectedType, boolean lazyRefAllowed) void
setAllProperties
(Map<?, ?> map) void
setAutoMatchProperty
(String type, Object value) void
setCompoundProperty
(String name, Object value) void
setConstructorArgNames
(String[] constructorArgNames) void
setConstructorArgNames
(List<String> constructorArgNames) void
setConstructorArgTypes
(Class[] constructorArgTypes) void
setConstructorArgTypes
(List<? extends Class<?>> constructorArgTypes) void
setFactoryMethod
(String factoryMethod) void
setFieldProperty
(String name, Object value) void
setMethodProperty
(String name, Object value) void
setProperties
(Object instance) private void
setProperties
(Map<ObjectRecipe.Property, Object> propertyValues, Object instance, Class clazz) private void
setProperty
(Object instance, Class clazz, ObjectRecipe.Property propertyName, Object propertyValue) void
setProperty
(String name, Object value) private void
setProperty
(ObjectRecipe.Property key, Object value) void
setRegistry
(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:
getNestedRecipes
in interfaceRecipe
- Overrides:
getNestedRecipes
in classAbstractRecipe
-
getConstructorRecipes
- Specified by:
getConstructorRecipes
in interfaceRecipe
- Overrides:
getConstructorRecipes
in classAbstractRecipe
-
canCreate
-
internalCreate
protected Object internalCreate(Type expectedType, boolean lazyRefAllowed) throws ConstructionException - Specified by:
internalCreate
in 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
-