org.jboss.wsf.spi.metadata.injection
Class InjectionMetaData

java.lang.Object
  extended by org.jboss.wsf.spi.metadata.injection.InjectionMetaData

public final class InjectionMetaData
extends java.lang.Object

An injection target specifies a class and a name within that class into which a resource should be injected.

Author:
Richard Opalka
See Also:
InjectionsMetaData

Constructor Summary
InjectionMetaData(java.lang.String targetClass, java.lang.String targetName, java.lang.String valueClass, java.lang.String envEntryName, boolean isValueSpecified)
          Constructor.
 
Method Summary
 java.lang.String getEnvEntryName()
          The env-entry-name element contains the name of a Deployment Component's environment entry.
 java.lang.String getTargetClass()
          The injection target class specifies the fully qualified class name that is the target of the injection.
 java.lang.String getTargetName()
          The injection target name specifies the target within the specified class.
 java.lang.Class<?> getValueClass()
          The env-entry-type element contains the Java language type of the environment entry.
 boolean isEnvEntryValueSpecified()
          If a value is not specified and injection is requested, no injection will occur and no entry of the specified name will be created.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

InjectionMetaData

public InjectionMetaData(java.lang.String targetClass,
                         java.lang.String targetName,
                         java.lang.String valueClass,
                         java.lang.String envEntryName,
                         boolean isValueSpecified)
Constructor.

Parameters:
targetClass - target class to do injection on
targetName - target name to do injection on (field or method)
valueClass - value class to be injected (can be null)
envEntryName - JNDI environment entry name to be injected
isValueSpecified - specifies whether value is specified (affects injection behavior)
Method Detail

getTargetClass

public java.lang.String getTargetClass()
The injection target class specifies the fully qualified class name that is the target of the injection. The Java EE specifications describe which classes can be an injection target.

Returns:
injection target class

getTargetName

public java.lang.String getTargetName()
The injection target name specifies the target within the specified class. The target is first looked for as a JavaBeans property name. If not found, the target is looked for as a field name. The specified resource will be injected into the target during initialization of the class by either calling the set method for the target property or by setting a value into the named field.

Returns:
injection target name

getValueClass

public java.lang.Class<?> getValueClass()
The env-entry-type element contains the Java language type of the environment entry. If an injection target is specified for the environment entry, the type may be omitted, or must match the type of the injection target. If no injection target is specified, the type is required.

Returns:
injection value type

getEnvEntryName

public java.lang.String getEnvEntryName()
The env-entry-name element contains the name of a Deployment Component's environment entry. The name is a JNDI name relative to the java:comp/env context. The name must be unique within a Deployment Component.

Returns:
JNDI environment entry name to be injected

isEnvEntryValueSpecified

public boolean isEnvEntryValueSpecified()
If a value is not specified and injection is requested, no injection will occur and no entry of the specified name will be created. This allows an initial value to be specified in the source code without being incorrectly changed when no override has been specified.

Returns:
whether value is specified

toString

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


Copyright © 2010 JBoss, a division of Red Hat. All Rights Reserved.