org.jboss.beans.metadata.plugins
Class AbstractDemandMetaData

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.beans.metadata.plugins.AbstractDemandMetaData
All Implemented Interfaces:
Serializable, Cloneable, DemandMetaData, MetaDataVisitorNode, org.jboss.util.JBossInterface

public class AbstractDemandMetaData
extends org.jboss.util.JBossObject
implements DemandMetaData, Serializable

A demand.

Version:
$Revision: 84514 $
Author:
Adrian Brock, Ales Justin
See Also:
Serialized Form

Nested Class Summary
 class AbstractDemandMetaData.DemandDependencyItem
          Information about a demand dependency.
 
Field Summary
protected  Object demand
          The demand
protected  ControllerState targetState
          The target/dependency state
protected  String transformer
          The transformer
protected  ControllerState whenRequired
          When the dependency is required
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
AbstractDemandMetaData()
          Create a new demand
AbstractDemandMetaData(Object demand)
          Create a new demand
 
Method Summary
 AbstractDemandMetaData clone()
          Clone the object
 void describeVisit(MetaDataVisitor vistor)
          Revisit the node
 boolean equals(Object obj)
           
 Iterator<? extends MetaDataVisitorNode> getChildren()
          Return the child nodes
 Object getDemand()
          What is demanded
protected  int getHashCode()
           
 ControllerState getTargetState()
          Get the target state
 String getTransformer()
          Get the transformer class name.
 ControllerState getWhenRequired()
          Get when the dependency is required
 void initialVisit(MetaDataVisitor visitor)
          Visit the node
 void setDemand(Object demand)
          Set the demand
 void setTargetState(ControllerState targetState)
          Set the target/dependency state.
 void setTransformer(String transformer)
          Set the transformer class name.
 void setWhenRequired(ControllerState whenRequired)
          Set the required state of the dependency
 void toShortString(org.jboss.util.JBossStringBuilder buffer)
           
 void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, equals, flushJBossObjectCache, getClassShortName, hashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.util.JBossInterface
toShortString
 

Field Detail

demand

protected Object demand
The demand


whenRequired

protected ControllerState whenRequired
When the dependency is required


targetState

protected ControllerState targetState
The target/dependency state


transformer

protected String transformer
The transformer

Constructor Detail

AbstractDemandMetaData

public AbstractDemandMetaData()
Create a new demand


AbstractDemandMetaData

public AbstractDemandMetaData(Object demand)
Create a new demand

Parameters:
demand - the demand
Method Detail

setWhenRequired

public void setWhenRequired(ControllerState whenRequired)
Set the required state of the dependency

Parameters:
whenRequired - when the dependecy is required

setDemand

public void setDemand(Object demand)
Set the demand

Parameters:
demand - the demand

setTargetState

public void setTargetState(ControllerState targetState)
Set the target/dependency state.

Parameters:
targetState - the target state

getDemand

public Object getDemand()
Description copied from interface: DemandMetaData
What is demanded

Specified by:
getDemand in interface DemandMetaData
Returns:
the demand

getWhenRequired

public ControllerState getWhenRequired()
Description copied from interface: DemandMetaData
Get when the dependency is required

Specified by:
getWhenRequired in interface DemandMetaData
Returns:
when the dependency is required

getTargetState

public ControllerState getTargetState()
Description copied from interface: DemandMetaData
Get the target state

Specified by:
getTargetState in interface DemandMetaData
Returns:
the target state

getTransformer

public String getTransformer()
Get the transformer class name.

Returns:
the transformer class name

setTransformer

public void setTransformer(String transformer)
Set the transformer class name.

Parameters:
transformer - the transformer class name

initialVisit

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

Specified by:
initialVisit in interface MetaDataVisitorNode
Parameters:
visitor - the visitor

describeVisit

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

Specified by:
describeVisit in interface MetaDataVisitorNode
Parameters:
vistor - the visitor

getChildren

public Iterator<? extends MetaDataVisitorNode> getChildren()
Description copied from interface: MetaDataVisitorNode
Return the child nodes

Specified by:
getChildren in interface MetaDataVisitorNode
Returns:
Iterator or null if there aren't any

toString

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

toShortString

public void toShortString(org.jboss.util.JBossStringBuilder buffer)
Specified by:
toShortString in interface org.jboss.util.JBossInterface
Overrides:
toShortString in class org.jboss.util.JBossObject

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

getHashCode

protected int getHashCode()
Overrides:
getHashCode in class org.jboss.util.JBossObject

clone

public AbstractDemandMetaData 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 org.jboss.util.JBossObject
Returns:
a clone of the object


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