org.jboss.beans.metadata.plugins
Class AbstractLifecycleMetaData

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.beans.metadata.plugins.AbstractFeatureMetaData
          extended by org.jboss.beans.metadata.plugins.AbstractLifecycleMetaData
All Implemented Interfaces:
Serializable, Cloneable, MutableParameterizedMetaData, TypeProvider, FeatureMetaData, LifecycleMetaData, MetaDataVisitorNode, ParameterizedMetaData, org.jboss.util.JBossInterface
Direct Known Subclasses:
AbstractCallbackMetaData, AbstractInstallMetaData

public class AbstractLifecycleMetaData
extends AbstractFeatureMetaData
implements LifecycleMetaData, MutableParameterizedMetaData, Serializable

Metadata for lifecycle.

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

Field Summary
protected  String methodName
          The method name
protected  List<ParameterMetaData> parameters
          The paramaters List
protected  ControllerState state
          The state
protected  String type
          The type - create, start, stop, destroy, install
 
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
AbstractLifecycleMetaData()
          Create a new lifecycle meta data
AbstractLifecycleMetaData(String methodName)
           
 
Method Summary
protected  void addChildren(Set<MetaDataVisitorNode> children)
           
 AbstractLifecycleMetaData clone()
          Clone the object
protected  void doClone(AbstractLifecycleMetaData clone)
           
protected  org.jboss.reflect.spi.ClassInfo getClassInfo(KernelControllerContext context)
           
 String getMethodName()
          Get the method name.
 List<ParameterMetaData> getParameters()
          Get the parameters.
 ControllerState getState()
          Get the state
 String getType()
          Get type - create, start, stop, destroy, install
 org.jboss.reflect.spi.TypeInfo getType(MetaDataVisitor visitor, MetaDataVisitorNode previous)
          Get the injectee type info.
 void initialVisit(MetaDataVisitor visitor)
          Visit the node
 boolean isIgnored()
          Is default ignored.
 void setIgnored(boolean ignored)
          Set ignored attribute.
 void setMethodName(String name)
          Set the method name
 void setParameters(List<ParameterMetaData> parameters)
          Set the parameters
 void setState(ControllerState state)
          Set the state
 void setType(String type)
           
 void toShortString(org.jboss.util.JBossStringBuilder buffer)
           
 void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.beans.metadata.plugins.AbstractFeatureMetaData
applyCollectionOrMapCheck, describeVisit, doClone, getAnnotations, getChildren, getDescription, setAnnotations, setDescription
 
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.beans.metadata.spi.FeatureMetaData
getAnnotations, getDescription
 
Methods inherited from interface org.jboss.util.JBossInterface
toShortString
 
Methods inherited from interface org.jboss.beans.metadata.spi.MetaDataVisitorNode
describeVisit, getChildren
 

Field Detail

state

protected ControllerState state
The state


methodName

protected String methodName
The method name


parameters

protected List<ParameterMetaData> parameters
The paramaters List


type

protected String type
The type - create, start, stop, destroy, install

Constructor Detail

AbstractLifecycleMetaData

public AbstractLifecycleMetaData()
Create a new lifecycle meta data


AbstractLifecycleMetaData

public AbstractLifecycleMetaData(String methodName)
Method Detail

getState

public ControllerState getState()
Description copied from interface: LifecycleMetaData
Get the state

Specified by:
getState in interface LifecycleMetaData
Returns:
the state

setState

public void setState(ControllerState state)
Description copied from interface: LifecycleMetaData
Set the state

Specified by:
setState in interface LifecycleMetaData
Parameters:
state - the state

getMethodName

public String getMethodName()
Description copied from interface: LifecycleMetaData
Get the method name.

Specified by:
getMethodName in interface LifecycleMetaData
Returns:
the method name.

setMethodName

public void setMethodName(String name)
Set the method name

Specified by:
setMethodName in interface LifecycleMetaData
Parameters:
name - the factory method

isIgnored

public boolean isIgnored()
Description copied from interface: LifecycleMetaData
Is default ignored.

Specified by:
isIgnored in interface LifecycleMetaData
Returns:
should we ignore default

setIgnored

public void setIgnored(boolean ignored)
Set ignored attribute.

Parameters:
ignored - the ignored

getParameters

public List<ParameterMetaData> getParameters()
Description copied from interface: ParameterizedMetaData
Get the parameters.

Specified by:
getParameters in interface ParameterizedMetaData
Returns:
List.

setParameters

public void setParameters(List<ParameterMetaData> parameters)
Set the parameters

Specified by:
setParameters in interface MutableParameterizedMetaData
Parameters:
parameters - List

getType

public String getType()
Get type - create, start, stop, destroy, install

Returns:
lifecycle type

setType

public void setType(String type)

initialVisit

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

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

addChildren

protected void addChildren(Set<MetaDataVisitorNode> children)
Overrides:
addChildren in class AbstractFeatureMetaData

getType

public org.jboss.reflect.spi.TypeInfo getType(MetaDataVisitor visitor,
                                              MetaDataVisitorNode previous)
                                       throws Throwable
Description copied from interface: TypeProvider
Get the injectee type info.

Specified by:
getType in interface TypeProvider
Parameters:
visitor - meda data visitor
previous - previous node in the stack
Returns:
TypeInfo type info for injection ByClass
Throws:
Throwable - if could not determine class

getClassInfo

protected org.jboss.reflect.spi.ClassInfo getClassInfo(KernelControllerContext context)
                                                throws Throwable
Throws:
Throwable

toString

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

toShortString

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

clone

public AbstractLifecycleMetaData 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

doClone

protected void doClone(AbstractLifecycleMetaData clone)


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