org.apache.xbean.recipe
Class ObjectRecipe

java.lang.Object
  extended by org.apache.xbean.recipe.AbstractRecipe
      extended by org.apache.xbean.recipe.ObjectRecipe
All Implemented Interfaces:
Serializable, Recipe

public class ObjectRecipe
extends AbstractRecipe

Version:
$Rev: 6688 $ $Date: 2005-12-29T02:08:29.200064Z $
See Also:
Serialized Form

Nested Class Summary
static class ObjectRecipe.AutoMatchProperty
           
static class ObjectRecipe.CompoundProperty
           
static class ObjectRecipe.FieldMember
           
static class ObjectRecipe.FieldProperty
           
static interface ObjectRecipe.Member
           
static class ObjectRecipe.MethodMember
           
static class ObjectRecipe.Property
           
static class ObjectRecipe.SetterProperty
           
 
Constructor Summary
ObjectRecipe(Class typeClass)
           
ObjectRecipe(Class typeClass, Map<String,Object> properties)
           
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(String typeName)
           
ObjectRecipe(String typeName, Map<String,Object> properties)
           
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)
           
 
Method Summary
 void allow(Option option)
           
 boolean canCreate(Type type)
           
 void disallow(Option option)
           
 List<String> getConstructorArgNames()
           
 List<Class<?>> getConstructorArgTypes()
           
 List<Recipe> getConstructorRecipes()
           
 String getFactoryMethod()
           
 List<Recipe> getNestedRecipes()
           
 Set<Option> getOptions()
           
 Map<String,Object> getProperties()
           
 Object getProperty(String name)
           
 Class getType()
           
 Map<String,Object> getUnsetProperties()
           
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(List<String> constructorArgNames)
           
 void setConstructorArgNames(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)
           
 void setProperty(String name, Object value)
           
 Class setStaticProperties()
           
 
Methods inherited from class org.apache.xbean.recipe.AbstractRecipe
create, create, create, getName, getPriority, setName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ObjectRecipe

public ObjectRecipe(Class typeClass)

ObjectRecipe

public ObjectRecipe(Class typeClass,
                    String factoryMethod)

ObjectRecipe

public ObjectRecipe(Class typeClass,
                    Map<String,Object> properties)

ObjectRecipe

public ObjectRecipe(Class typeClass,
                    String[] constructorArgNames)

ObjectRecipe

public ObjectRecipe(Class typeClass,
                    String[] constructorArgNames,
                    Class[] constructorArgTypes)

ObjectRecipe

public ObjectRecipe(Class type,
                    String factoryMethod,
                    String[] constructorArgNames)

ObjectRecipe

public ObjectRecipe(Class type,
                    String factoryMethod,
                    String[] constructorArgNames,
                    Class[] constructorArgTypes)

ObjectRecipe

public ObjectRecipe(Class typeClass,
                    String factoryMethod,
                    String[] constructorArgNames,
                    Class[] constructorArgTypes,
                    Map<String,Object> properties)

ObjectRecipe

public ObjectRecipe(String typeName)

ObjectRecipe

public ObjectRecipe(String typeName,
                    String factoryMethod)

ObjectRecipe

public ObjectRecipe(String typeName,
                    Map<String,Object> properties)

ObjectRecipe

public ObjectRecipe(String typeName,
                    String[] constructorArgNames)

ObjectRecipe

public ObjectRecipe(String typeName,
                    String[] constructorArgNames,
                    Class[] constructorArgTypes)

ObjectRecipe

public ObjectRecipe(String typeName,
                    String factoryMethod,
                    String[] constructorArgNames)

ObjectRecipe

public ObjectRecipe(String typeName,
                    String factoryMethod,
                    String[] constructorArgNames,
                    Class[] constructorArgTypes)

ObjectRecipe

public ObjectRecipe(String typeName,
                    String factoryMethod,
                    String[] constructorArgNames,
                    Class[] constructorArgTypes,
                    Map<String,Object> properties)
Method Detail

allow

public void allow(Option option)

disallow

public void disallow(Option option)

getOptions

public Set<Option> getOptions()

getConstructorArgNames

public List<String> getConstructorArgNames()

setConstructorArgNames

public void setConstructorArgNames(String[] constructorArgNames)

setConstructorArgNames

public void setConstructorArgNames(List<String> constructorArgNames)

getConstructorArgTypes

public List<Class<?>> getConstructorArgTypes()

setConstructorArgTypes

public void setConstructorArgTypes(Class[] constructorArgTypes)

setConstructorArgTypes

public void setConstructorArgTypes(List<? extends Class<?>> constructorArgTypes)

getFactoryMethod

public String getFactoryMethod()

setFactoryMethod

public void setFactoryMethod(String factoryMethod)

getProperty

public Object getProperty(String name)

getProperties

public Map<String,Object> getProperties()

setProperty

public void setProperty(String name,
                        Object value)

setFieldProperty

public void setFieldProperty(String name,
                             Object value)

setMethodProperty

public void setMethodProperty(String name,
                              Object value)

setAutoMatchProperty

public void setAutoMatchProperty(String type,
                                 Object value)

setCompoundProperty

public void setCompoundProperty(String name,
                                Object value)

setAllProperties

public void setAllProperties(Map<?,?> map)

getUnsetProperties

public Map<String,Object> getUnsetProperties()

getNestedRecipes

public List<Recipe> getNestedRecipes()
Specified by:
getNestedRecipes in interface Recipe
Overrides:
getNestedRecipes in class AbstractRecipe

getConstructorRecipes

public List<Recipe> getConstructorRecipes()
Specified by:
getConstructorRecipes in interface Recipe
Overrides:
getConstructorRecipes in class AbstractRecipe

canCreate

public boolean canCreate(Type type)

internalCreate

protected Object internalCreate(Type expectedType,
                                boolean lazyRefAllowed)
                         throws ConstructionException
Specified by:
internalCreate in class AbstractRecipe
Throws:
ConstructionException

setProperties

public void setProperties(Object instance)
                   throws ConstructionException
Throws:
ConstructionException

setStaticProperties

public Class setStaticProperties()
                          throws ConstructionException
Throws:
ConstructionException

getType

public Class getType()


Copyright © 2005-2009 The Apache Software Foundation. All Rights Reserved.