org.jboss.beans.metadata.plugins
Class AbstractInjectionValueMetaData

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.beans.metadata.plugins.AbstractValueMetaData
          extended by org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData
              extended by org.jboss.beans.metadata.plugins.AbstractInjectionValueMetaData
All Implemented Interfaces:
Serializable, Cloneable, TypeProvider, MetaDataVisitorNode, ValueMetaData, org.jboss.util.JBossInterface

public class AbstractInjectionValueMetaData
extends AbstractDependencyValueMetaData

Injection value.

Author:
Ales Justin
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData
AbstractDependencyValueMetaData.OptionalDependencyItem
 
Field Summary
protected  FromContext fromContext
           
protected  InjectOption injectionOption
           
protected  AutowireType injectionType
           
protected  AbstractPropertyMetaData propertyMetaData
          Simplyifies things with AutowireType.BY_NAME
 
Fields inherited from class org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData
context, dependentState, optionalWhenRequired, property, search, whenRequiredState
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Fields inherited from interface org.jboss.beans.metadata.plugins.TypeProvider
ERROR_MSG
 
Constructor Summary
AbstractInjectionValueMetaData()
          Create a new injection value
AbstractInjectionValueMetaData(Object value)
          Create a new injection value
AbstractInjectionValueMetaData(Object value, String property)
          Create a new injection value
 
Method Summary
protected  boolean addDependencyItem()
           
protected  void addInstallItem(Object name)
          Add install/callback item.
 AbstractInjectionValueMetaData clone()
          Clone the object
 void describeVisit(MetaDataVisitor visitor)
          Revisit the node
 FromContext getFromContext()
           
 InjectOption getInjectionOption()
           
 AutowireType getInjectionType()
           
 AbstractPropertyMetaData getPropertyMetaData()
           
 Object getUnderlyingValue()
          Get the underlying value
 Object getValue(org.jboss.reflect.spi.TypeInfo info, ClassLoader cl)
          Get the value.
 void initialVisit(MetaDataVisitor visitor)
          Visit the node
protected  boolean isLookupValid(ControllerContext lookup)
           
protected  boolean isOptional()
           
 void setFromContext(FromContext fromContext)
           
 void setInjectionOption(InjectOption injectionOption)
           
 void setInjectionType(AutowireType injectionType)
           
 void setPropertyMetaData(AbstractPropertyMetaData propertyMetaData)
           
 void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.beans.metadata.plugins.AbstractDependencyValueMetaData
addOptionalDependency, getControllerContext, getDependentState, getProperty, getSearch, getWhenRequiredState, isSearchApplied, setDependentState, setProperty, setSearch, setValue, setValueObject, setWhenRequiredState
 
Methods inherited from class org.jboss.beans.metadata.plugins.AbstractValueMetaData
getChildren, getType, getValue, isUseJMXObjectNameFix, toShortString
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, equals, flushJBossObjectCache, getClassShortName, getHashCode, hashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.util.JBossInterface
toShortString
 

Field Detail

injectionType

protected AutowireType injectionType

injectionOption

protected InjectOption injectionOption

fromContext

protected FromContext fromContext

propertyMetaData

protected AbstractPropertyMetaData propertyMetaData
Simplyifies things with AutowireType.BY_NAME

Constructor Detail

AbstractInjectionValueMetaData

public AbstractInjectionValueMetaData()
Create a new injection value


AbstractInjectionValueMetaData

public AbstractInjectionValueMetaData(Object value)
Create a new injection value

Parameters:
value - the value

AbstractInjectionValueMetaData

public AbstractInjectionValueMetaData(Object value,
                                      String property)
Create a new injection value

Parameters:
value - the value
property - the property
Method Detail

getInjectionType

public AutowireType getInjectionType()

setInjectionType

public void setInjectionType(AutowireType injectionType)

getInjectionOption

public InjectOption getInjectionOption()

setInjectionOption

public void setInjectionOption(InjectOption injectionOption)

getFromContext

public FromContext getFromContext()

setFromContext

public void setFromContext(FromContext fromContext)

getPropertyMetaData

public AbstractPropertyMetaData getPropertyMetaData()

setPropertyMetaData

public void setPropertyMetaData(AbstractPropertyMetaData propertyMetaData)

addInstallItem

protected void addInstallItem(Object name)
Add install/callback item.

Parameters:
name - the callback name

isLookupValid

protected boolean isLookupValid(ControllerContext lookup)
Overrides:
isLookupValid in class AbstractDependencyValueMetaData

isOptional

protected boolean isOptional()
Overrides:
isOptional in class AbstractDependencyValueMetaData

getValue

public Object getValue(org.jboss.reflect.spi.TypeInfo info,
                       ClassLoader cl)
                throws Throwable
Description copied from interface: ValueMetaData
Get the value.

Specified by:
getValue in interface ValueMetaData
Overrides:
getValue in class AbstractDependencyValueMetaData
Parameters:
info - the type info
cl - the classloader
Returns:
the value.
Throws:
Throwable - for any error

addDependencyItem

protected boolean addDependencyItem()
Overrides:
addDependencyItem in class AbstractDependencyValueMetaData

getUnderlyingValue

public Object getUnderlyingValue()
Description copied from interface: ValueMetaData
Get the underlying value

Specified by:
getUnderlyingValue in interface ValueMetaData
Overrides:
getUnderlyingValue in class AbstractValueMetaData
Returns:
the underlying value

initialVisit

public void initialVisit(MetaDataVisitor visitor)
Description copied from interface: MetaDataVisitorNode
Visit the node

Specified by:
initialVisit in interface MetaDataVisitorNode
Overrides:
initialVisit in class AbstractDependencyValueMetaData
Parameters:
visitor - the visitor

describeVisit

public void describeVisit(MetaDataVisitor visitor)
Description copied from interface: MetaDataVisitorNode
Revisit the node

Specified by:
describeVisit in interface MetaDataVisitorNode
Overrides:
describeVisit in class AbstractValueMetaData
Parameters:
visitor - the visitor

toString

public void toString(org.jboss.util.JBossStringBuilder buffer)
Overrides:
toString in class AbstractDependencyValueMetaData

clone

public AbstractInjectionValueMetaData clone()
Description copied from interface: MetaDataVisitorNode
Clone the object

Specified by:
clone in interface MetaDataVisitorNode
Specified by:
clone in interface org.jboss.util.JBossInterface
Overrides:
clone in class AbstractDependencyValueMetaData
Returns:
a clone of the object


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