org.jboss.beans.metadata.plugins
Class AbstractDependencyValueMetaData

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
All Implemented Interfaces:
Serializable, Cloneable, TypeProvider, MetaDataVisitorNode, ValueMetaData, org.jboss.util.JBossInterface
Direct Known Subclasses:
AbstractInjectionValueMetaData

public class AbstractDependencyValueMetaData
extends AbstractValueMetaData

Dependency value.

Version:
$Revision: 63938 $
Author:
Adrian Brock
See Also:
Serialized Form

Field Summary
protected  KernelControllerContext context
          The context
protected  org.jboss.dependency.spi.ControllerState dependentState
          The required state of the dependency or null to look in the registry
protected  String property
          The property name
protected  org.jboss.dependency.spi.ControllerState whenRequiredState
          The when required state of the dependency or null to use current context state
 
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
AbstractDependencyValueMetaData()
          Create a new dependency value
AbstractDependencyValueMetaData(Object value)
          Create a new dependency value
AbstractDependencyValueMetaData(Object value, String property)
          Create a new dependency value
 
Method Summary
protected  boolean addDependencyItem()
           
 org.jboss.dependency.spi.ControllerState getDependentState()
           
 String getProperty()
          Get the property
 Object getValue(org.jboss.reflect.spi.TypeInfo info, ClassLoader cl)
          Get the value.
 org.jboss.dependency.spi.ControllerState getWhenRequiredState()
           
 void initialVisit(MetaDataVisitor visitor)
          Visit the node
protected  boolean isLookupValid(org.jboss.dependency.spi.ControllerContext lookup)
           
 void setDependentState(org.jboss.dependency.spi.ControllerState dependentState)
          Set the required state of the dependency
 void setProperty(String property)
          Set the property
 void setWhenRequiredState(org.jboss.dependency.spi.ControllerState whenRequiredState)
          Set the when required state of the dependency
 void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.beans.metadata.plugins.AbstractValueMetaData
describeVisit, getChildren, getType, getUnderlyingValue, getValue, setValue, toShortString
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, 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
clone, toShortString
 

Field Detail

context

protected transient KernelControllerContext context
The context


property

protected String property
The property name


whenRequiredState

protected org.jboss.dependency.spi.ControllerState whenRequiredState
The when required state of the dependency or null to use current context state


dependentState

protected org.jboss.dependency.spi.ControllerState dependentState
The required state of the dependency or null to look in the registry

Constructor Detail

AbstractDependencyValueMetaData

public AbstractDependencyValueMetaData()
Create a new dependency value


AbstractDependencyValueMetaData

public AbstractDependencyValueMetaData(Object value)
Create a new dependency value

Parameters:
value - the value

AbstractDependencyValueMetaData

public AbstractDependencyValueMetaData(Object value,
                                       String property)
Create a new dependency value

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

getProperty

public String getProperty()
Get the property

Returns:
the property

setProperty

public void setProperty(String property)
Set the property

Parameters:
property - the property name

setWhenRequiredState

public void setWhenRequiredState(org.jboss.dependency.spi.ControllerState whenRequiredState)
Set the when required state of the dependency

Parameters:
whenRequiredState - the when required state or null if it uses current context state

getWhenRequiredState

public org.jboss.dependency.spi.ControllerState getWhenRequiredState()

setDependentState

public void setDependentState(org.jboss.dependency.spi.ControllerState dependentState)
Set the required state of the dependency

Parameters:
dependentState - the required state or null if it must be in the registry

getDependentState

public org.jboss.dependency.spi.ControllerState getDependentState()

isLookupValid

protected boolean isLookupValid(org.jboss.dependency.spi.ControllerContext lookup)

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 AbstractValueMetaData
Parameters:
info - the type info
cl - the classloader
Returns:
the value.
Throws:
Throwable - for any error

addDependencyItem

protected boolean addDependencyItem()

initialVisit

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

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

toString

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


Copyright ? 2007 JBoss Inc.. All Rights Reserved.