com.caucho.webbeans.component
Class ClassComponent

java.lang.Object
  extended by com.caucho.webbeans.component.ComponentImpl
      extended by com.caucho.webbeans.component.ClassComponent
All Implemented Interfaces:
ObjectProxy, ComponentFactory
Direct Known Subclasses:
SingletonClassComponent, SingletonComponent

public class ClassComponent
extends ComponentImpl

Configuration for the xml web bean component.


Field Summary
 
Fields inherited from class com.caucho.webbeans.component.ComponentImpl
_destroyProgram, _initProgram, _injectProgram, _scope, _webbeans
 
Constructor Summary
ClassComponent(WbWebBeans webbeans)
           
 
Method Summary
 void bind()
          Binds parameters
protected  ComponentImpl createArg(ConfigType type, ConfigProgram program)
           
protected  java.lang.Object createNew(ConfigContext env)
          Creates a new instance of the component
 java.lang.Object get(ConfigContext env)
          Creates a new instance of the component.
 java.lang.Class getInstanceClass()
           
 java.lang.Class getMBeanInterface()
           
protected  java.lang.String getMBeanName()
           
 void init()
          Initialization.
 void introspect()
          Called for implicit introspection.
protected  void introspectBindings()
          Introspects the methods for any @Produces
protected  void introspectConstructor()
          Introspects the constructor
protected  void introspectInterceptors()
          Introspects any intercepted methods
protected  void introspectObservers()
          Introspects any observers.
 void setConstructor(java.lang.reflect.Constructor ctor)
           
 void setInstanceClass(java.lang.Class cl)
           
 void setMBeanName(java.lang.String name)
           
 void setNewArgs(java.util.ArrayList<ConfigProgram> args)
          Sets the init program.
 
Methods inherited from class com.caucho.webbeans.component.ComponentImpl
addNameBinding, addProgram, create, createNoInit, createObject, createProgram, destroy, destroy, equals, error, get, getBindingList, getClassName, getHandle, getIfExists, getName, getScope, getScopeId, getSimpleName, getTargetClass, getTargetSimpleName, getTargetType, getType, getWebBeans, init, introspectScope, isDestroyPresent, isFromClass, isMatch, isMatch, isMatchByBinding, isMatchByBinding, isSingleton, setBindingList, setFromClass, setInit, setName, setScope, setTargetType, setType, toDebugString, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ClassComponent

public ClassComponent(WbWebBeans webbeans)
Method Detail

setInstanceClass

public void setInstanceClass(java.lang.Class cl)

getInstanceClass

public java.lang.Class getInstanceClass()

setConstructor

public void setConstructor(java.lang.reflect.Constructor ctor)

setMBeanName

public void setMBeanName(java.lang.String name)

getMBeanInterface

public java.lang.Class getMBeanInterface()

setNewArgs

public void setNewArgs(java.util.ArrayList<ConfigProgram> args)
Sets the init program.


init

public void init()
Description copied from class: ComponentImpl
Initialization.

Overrides:
init in class ComponentImpl

introspect

public void introspect()
Called for implicit introspection.

Overrides:
introspect in class ComponentImpl

introspectConstructor

protected void introspectConstructor()
Introspects the constructor


getMBeanName

protected java.lang.String getMBeanName()

get

public java.lang.Object get(ConfigContext env)
Creates a new instance of the component.

Overrides:
get in class ComponentImpl

createNew

protected java.lang.Object createNew(ConfigContext env)
Description copied from class: ComponentImpl
Creates a new instance of the component

Overrides:
createNew in class ComponentImpl
Parameters:
env - the configuration environment
Returns:
the new object

bind

public void bind()
Binds parameters

Overrides:
bind in class ComponentImpl

createArg

protected ComponentImpl createArg(ConfigType type,
                                  ConfigProgram program)

introspectBindings

protected void introspectBindings()
Introspects the methods for any @Produces

Overrides:
introspectBindings in class ComponentImpl

introspectObservers

protected void introspectObservers()
Introspects any observers.


introspectInterceptors

protected void introspectInterceptors()
Introspects any intercepted methods