org.apache.xbean.recipe
Class ObjectRecipe

java.lang.Object
  extended byorg.apache.xbean.recipe.ObjectRecipe
All Implemented Interfaces:
Recipe, java.io.Serializable

public class ObjectRecipe
extends java.lang.Object
implements Recipe

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

Constructor Summary
ObjectRecipe(java.lang.Class type)
           
ObjectRecipe(java.lang.Class type, java.util.Map properties)
           
ObjectRecipe(java.lang.Class type, java.lang.String factoryMethod)
           
ObjectRecipe(java.lang.Class type, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)
           
ObjectRecipe(java.lang.Class type, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes)
           
ObjectRecipe(java.lang.String typeName)
           
ObjectRecipe(java.lang.String typeName, java.util.Map properties)
           
ObjectRecipe(java.lang.String typeName, java.lang.String factoryMethod)
           
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, java.lang.Class[] constructorArgTypes)
           
ObjectRecipe(java.lang.String type, java.lang.String factoryMethod, java.lang.String[] constructorArgNames, java.lang.Class[] constructorArgTypes, java.util.Map properties)
           
 
Method Summary
 java.lang.Object create()
           
 java.lang.Object create(java.lang.ClassLoader classLoader)
           
static java.lang.reflect.Method findSetter(java.lang.Class typeClass, java.lang.String propertyName, java.lang.Object propertyValue)
           
 java.lang.Object getProperty(java.lang.String name)
           
static boolean isAssignableFrom(java.lang.Class[] expectedTypes, java.lang.Class[] actualTypes)
           
static boolean isAssignableFrom(java.lang.Class expected, java.lang.Class actual)
           
static boolean isConvertable(java.lang.Class methodParameterType, java.lang.Object propertyValue)
           
static boolean isInstance(java.lang.Class type, java.lang.Object instance)
           
 void setAllProperties(java.util.Map map)
           
 void setProperty(java.lang.String name, java.lang.Object value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ObjectRecipe

public ObjectRecipe(java.lang.Class type)

ObjectRecipe

public ObjectRecipe(java.lang.Class type,
                    java.lang.String factoryMethod)

ObjectRecipe

public ObjectRecipe(java.lang.Class type,
                    java.util.Map properties)

ObjectRecipe

public ObjectRecipe(java.lang.Class type,
                    java.lang.String[] constructorArgNames,
                    java.lang.Class[] constructorArgTypes)

ObjectRecipe

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

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 properties)

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,
                    java.lang.Class[] constructorArgTypes)

ObjectRecipe

public ObjectRecipe(java.lang.String type,
                    java.lang.String factoryMethod,
                    java.lang.String[] constructorArgNames,
                    java.lang.Class[] constructorArgTypes,
                    java.util.Map properties)
Method Detail

getProperty

public java.lang.Object getProperty(java.lang.String name)

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)

setAllProperties

public void setAllProperties(java.util.Map map)

create

public java.lang.Object create()
                        throws ConstructionException
Throws:
ConstructionException

create

public java.lang.Object create(java.lang.ClassLoader classLoader)
                        throws ConstructionException
Specified by:
create in interface Recipe
Throws:
ConstructionException

findSetter

public static java.lang.reflect.Method findSetter(java.lang.Class typeClass,
                                                  java.lang.String propertyName,
                                                  java.lang.Object propertyValue)

isConvertable

public static boolean isConvertable(java.lang.Class methodParameterType,
                                    java.lang.Object propertyValue)

isInstance

public static boolean isInstance(java.lang.Class type,
                                 java.lang.Object instance)

isAssignableFrom

public static boolean isAssignableFrom(java.lang.Class expected,
                                       java.lang.Class actual)

isAssignableFrom

public static boolean isAssignableFrom(java.lang.Class[] expectedTypes,
                                       java.lang.Class[] actualTypes)


Copyright © {inceptionYear}-2006 Apache Software Foundation. All Rights Reserved.