|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.caucho.webbeans.component.ComponentImpl
public class ComponentImpl
Configuration for the xml web bean component.
| Field Summary | |
|---|---|
protected ConfigProgram[] |
_destroyProgram
|
protected ConfigProgram[] |
_initProgram
|
protected ConfigProgram[] |
_injectProgram
|
protected ScopeContext |
_scope
|
protected WbWebBeans |
_webbeans
|
| Constructor Summary | |
|---|---|
ComponentImpl(WbWebBeans webbeans)
|
|
| Method Summary | |
|---|---|
void |
addNameBinding(java.lang.String name)
|
void |
addProgram(ConfigProgram program)
Add to the init program. |
void |
bind()
Binds parameters |
java.lang.Object |
create()
Creates a new instance of the component. |
protected java.lang.Object |
createNew(ConfigContext env)
Creates a new instance of the component |
java.lang.Object |
createNoInit()
Creates a new instance of the component. |
java.lang.Object |
createObject(java.util.Hashtable env)
Returns the new object for JNDI |
void |
createProgram(java.util.ArrayList<ConfigProgram> initList,
java.lang.reflect.Field field)
|
void |
destroy(java.lang.Object value)
Destroys the value |
void |
destroy(java.lang.Object value,
ConfigContext env)
Destroys the value |
boolean |
equals(java.lang.Object obj)
|
protected ConfigException |
error(java.lang.reflect.Method method,
java.lang.String msg)
|
java.lang.Object |
get()
Returns the component object, creating if necessary |
java.lang.Object |
get(ConfigContext env)
|
java.util.ArrayList<WbBinding> |
getBindingList()
|
java.lang.String |
getClassName()
|
WebBeansHandle |
getHandle()
Returns the serialization handle |
java.lang.Object |
getIfExists()
Returns the component object if it already exists |
java.lang.String |
getName()
Gets the component's EL binding name. |
ScopeContext |
getScope()
Gets the scope annotation. |
java.lang.String |
getScopeId()
|
protected static java.lang.String |
getSimpleName(java.lang.reflect.Type type)
|
java.lang.Class |
getTargetClass()
|
java.lang.String |
getTargetSimpleName()
|
java.lang.reflect.Type |
getTargetType()
|
WbComponentType |
getType()
Gets the component type. |
WbWebBeans |
getWebBeans()
|
void |
init()
Initialization. |
protected java.lang.Object |
init(java.lang.Object value,
ConfigContext env)
Initialize the created value |
protected void |
introspect()
|
protected void |
introspectBindings()
Introspects the methods for any @Produces |
protected void |
introspectScope(java.lang.Class type)
Called for implicit introspection. |
boolean |
isDestroyPresent()
Returns true if there's a destroy program. |
boolean |
isFromClass()
True if the component was defined by class introspection. |
boolean |
isMatch(java.lang.annotation.Annotation bindAnn)
Returns true if at least one of this component's bindings match the injection binding. |
boolean |
isMatch(java.util.ArrayList<java.lang.annotation.Annotation> bindList)
|
boolean |
isMatchByBinding(java.util.ArrayList<Binding> bindList)
|
boolean |
isMatchByBinding(Binding binding)
Returns true if at least one of this component's bindings match the injection binding. |
boolean |
isSingleton()
|
void |
setBindingList(java.util.ArrayList<WbBinding> bindingList)
Adds a component binding. |
void |
setFromClass(boolean isFromClass)
True if the component was defined by class introspection. |
void |
setInit(ContainerProgram init)
Sets the init program. |
void |
setName(java.lang.String name)
Returns the component's EL binding name. |
void |
setScope(ScopeContext scope)
Sets the scope annotation. |
void |
setTargetType(java.lang.reflect.Type type)
|
void |
setType(WbComponentType type)
Sets the component type. |
java.lang.String |
toDebugString()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected WbWebBeans _webbeans
protected ScopeContext _scope
protected ConfigProgram[] _injectProgram
protected ConfigProgram[] _initProgram
protected ConfigProgram[] _destroyProgram
| Constructor Detail |
|---|
public ComponentImpl(WbWebBeans webbeans)
| Method Detail |
|---|
public WbWebBeans getWebBeans()
public void setName(java.lang.String name)
public java.lang.String getName()
public void addNameBinding(java.lang.String name)
public WbComponentType getType()
public void setType(WbComponentType type)
public void setTargetType(java.lang.reflect.Type type)
public java.lang.reflect.Type getTargetType()
public java.lang.String getTargetSimpleName()
public java.lang.Class getTargetClass()
public java.lang.String getClassName()
public void setBindingList(java.util.ArrayList<WbBinding> bindingList)
public java.util.ArrayList<WbBinding> getBindingList()
public void setScope(ScopeContext scope)
public ScopeContext getScope()
public boolean isSingleton()
public void setInit(ContainerProgram init)
public void addProgram(ConfigProgram program)
public void setFromClass(boolean isFromClass)
public boolean isFromClass()
public WebBeansHandle getHandle()
public void init()
protected void introspect()
protected void introspectScope(java.lang.Class type)
protected void introspectBindings()
public boolean isMatch(java.util.ArrayList<java.lang.annotation.Annotation> bindList)
public boolean isMatch(java.lang.annotation.Annotation bindAnn)
public boolean isMatchByBinding(java.util.ArrayList<Binding> bindList)
public boolean isMatchByBinding(Binding binding)
public java.lang.Object getIfExists()
public java.lang.Object get()
get in interface ComponentFactorypublic java.lang.Object get(ConfigContext env)
public java.lang.Object create()
create in interface ComponentFactorypublic java.lang.Object createNoInit()
protected java.lang.Object createNew(ConfigContext env)
env - the configuration environment
protected java.lang.Object init(java.lang.Object value,
ConfigContext env)
public boolean isDestroyPresent()
public void destroy(java.lang.Object value,
ConfigContext env)
public void destroy(java.lang.Object value)
destroy in interface ComponentFactorypublic void bind()
public void createProgram(java.util.ArrayList<ConfigProgram> initList,
java.lang.reflect.Field field)
throws ConfigException
ConfigExceptionpublic java.lang.String getScopeId()
public java.lang.Object createObject(java.util.Hashtable env)
createObject in interface ObjectProxy
protected ConfigException error(java.lang.reflect.Method method,
java.lang.String msg)
public boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.lang.String toDebugString()
public java.lang.String toString()
toString in class java.lang.Objectprotected static java.lang.String getSimpleName(java.lang.reflect.Type type)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||