com.bstek.dorado.config.definition
public class ObjectDefinition extends Definition
Modifier and Type | Class and Description |
---|---|
static class |
ObjectDefinition.CreationInfo |
Constructor and Description |
---|
ObjectDefinition() |
Modifier and Type | Method and Description |
---|---|
protected ExpressionMethodInterceptor |
createExpressionMethodInterceptor(java.util.Map<java.lang.String,Expression> expressionProperties)
根据EL表达式的集合创建一个动态表达式拦截器。
其中expressionProperties参数的键值为相应的对象属性名,值为EL表达式。 |
protected BeanWrapper |
createObject(ObjectDefinition.CreationInfo creationInfo,
java.lang.Object[] constuctorArgs,
org.aopalliance.intercept.MethodInterceptor[] methodInterceptors,
CreationContext context)
根据给定创建信息和拦截器的数组创建一个对象实例。
|
protected java.lang.Object |
doCreate(CreationContext context,
java.lang.Object[] constuctorArgs) |
java.lang.String |
getBeanId()
返回对象在被放置到
ScopeManager 中进行管理时所使用的id。 |
java.lang.Class<?>[] |
getConstructorArgTypes() |
protected java.lang.Object |
getFinalValueOrExpression(java.lang.Object valueDefinition,
CreationContext creationContext) |
java.lang.String |
getImpl()
返回对象的实现方式。
|
java.lang.Class<?> |
getImplType() |
protected org.aopalliance.intercept.MethodInterceptor[] |
getMethodInterceptors(ObjectDefinition.CreationInfo creationInfo,
CreationContext context)
返回将要关联在新创建的对象(最终对象)上的拦截器的数组。
|
DefinitionReference<? extends Definition>[] |
getParentReferences()
返回父配置声明对象的引用数组。
|
Definition[] |
getParents()
返回父配置声明对象的数组。
|
Scope |
getScope()
返回对象的作用范围。
|
protected void |
initCreationInfo(ObjectDefinition.CreationInfo creationInfo,
ObjectDefinition definition,
boolean processConstrInfos)
初始化对象创建信息。
即将本配置声明对象中定义的各种信息包括从父对象中继承而来的信息收集到createInfo参数所指定的对象中,以便于创建创建最终对象。 |
protected void |
initObject(java.lang.Object object,
ObjectDefinition.CreationInfo creationInfo,
CreationContext context)
根据创建信息中的定义初始化一个对象。
|
boolean |
isCacheCreatedObject() |
void |
setBeanId(java.lang.String beanId)
设置对象在被放置到
ScopeManager 中进行管理时所使用的id。 |
void |
setCacheCreatedObject(boolean cacheCreatedObject) |
void |
setConstructorArgTypes(java.lang.Class<?>[] constructorArgTypes) |
void |
setImpl(java.lang.String impl)
|
void |
setImplType(java.lang.Class<?> implType) |
void |
setParent(Definition parent) |
void |
setParentReference(DefinitionReference<? extends Definition> parentReference) |
void |
setParentReferences(DefinitionReference<? extends Definition>[] parentReferences)
设置父配置声明对象的引用数组。
|
void |
setParents(Definition[] parents)
设置父配置声明对象的数组。
|
void |
setScope(Scope scope)
设置对象的作用范围。
|
addInitOperation, clone, create, create, executeInitOperations, getDependentResources, getInitOperations, getProperties, getProperty, getResource, initProperties, removeProperty, setDependentResources, setObjectProperty, setProperties, setProperty, setResource
public java.lang.String getImpl()
public void setImpl(java.lang.String impl) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
public java.lang.Class<?> getImplType()
public void setImplType(java.lang.Class<?> implType)
public java.lang.Class<?>[] getConstructorArgTypes()
public void setConstructorArgTypes(java.lang.Class<?>[] constructorArgTypes)
public Scope getScope()
public void setScope(Scope scope)
ScopeManager
public java.lang.String getBeanId()
ScopeManager
中进行管理时所使用的id。public void setBeanId(java.lang.String beanId)
ScopeManager
中进行管理时所使用的id。public DefinitionReference<? extends Definition>[] getParentReferences()
public Definition[] getParents()
public void setParentReferences(DefinitionReference<? extends Definition>[] parentReferences)
public void setParentReference(DefinitionReference<? extends Definition> parentReference)
public void setParents(Definition[] parents)
public void setParent(Definition parent)
public boolean isCacheCreatedObject()
public void setCacheCreatedObject(boolean cacheCreatedObject)
protected java.lang.Object doCreate(CreationContext context, java.lang.Object[] constuctorArgs) throws java.lang.Exception
doCreate
in class Definition
java.lang.Exception
protected java.lang.Object getFinalValueOrExpression(java.lang.Object valueDefinition, CreationContext creationContext) throws java.lang.Exception
java.lang.Exception
protected void initCreationInfo(ObjectDefinition.CreationInfo creationInfo, ObjectDefinition definition, boolean processConstrInfos) throws java.lang.Exception
java.lang.Exception
protected void initObject(java.lang.Object object, ObjectDefinition.CreationInfo creationInfo, CreationContext context) throws java.lang.Exception
java.lang.Exception
protected org.aopalliance.intercept.MethodInterceptor[] getMethodInterceptors(ObjectDefinition.CreationInfo creationInfo, CreationContext context) throws java.lang.Exception
java.lang.Exception
protected ExpressionMethodInterceptor createExpressionMethodInterceptor(java.util.Map<java.lang.String,Expression> expressionProperties)
protected BeanWrapper createObject(ObjectDefinition.CreationInfo creationInfo, java.lang.Object[] constuctorArgs, org.aopalliance.intercept.MethodInterceptor[] methodInterceptors, CreationContext context) throws java.lang.Exception
creationInfo
- 对象创建信息methodInterceptors
- 拦截器的数组context
- 创建上下文java.lang.Exception
Copyright © 2001-2011 www.BSTEK.com All Rights Reserved.