com.caucho.config.program
Class PropertyValueProgram

java.lang.Object
  extended by com.caucho.config.program.ConfigProgram
      extended by com.caucho.config.program.PropertyValueProgram
All Implemented Interfaces:
java.lang.Comparable<ConfigProgram>

public class PropertyValueProgram
extends ConfigProgram

A saved program for configuring an object.


Constructor Summary
PropertyValueProgram(java.lang.Class<?> type, java.lang.String name, java.lang.Object value)
           
PropertyValueProgram(java.lang.String name, java.lang.Object value)
           
 
Method Summary
<T> T
create(ConfigType<T> type, CreationalContext<T> env)
           
 java.lang.String getName()
          Returns the injection name.
<T> void
inject(T bean, CreationalContext<T> env)
          Injects the bean with the dependencies
 java.lang.String toString()
           
 
Methods inherited from class com.caucho.config.program.ConfigProgram
addProgram, bind, compareTo, configure, configure, configure, create, create, getDeclaringClass, getPriority, getQName, init
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PropertyValueProgram

public PropertyValueProgram(java.lang.String name,
                            java.lang.Object value)

PropertyValueProgram

public PropertyValueProgram(java.lang.Class<?> type,
                            java.lang.String name,
                            java.lang.Object value)
Method Detail

getName

public java.lang.String getName()
Returns the injection name.

Overrides:
getName in class ConfigProgram

inject

public <T> void inject(T bean,
                       CreationalContext<T> env)
Injects the bean with the dependencies

Specified by:
inject in class ConfigProgram
Parameters:
bean - the bean to configure

create

public <T> T create(ConfigType<T> type,
                    CreationalContext<T> env)
         throws ConfigException
Overrides:
create in class ConfigProgram
Throws:
ConfigException

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object