org.jboss.beans.metadata.plugins
Class AbstractParameterMetaData

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.beans.metadata.plugins.AbstractFeatureMetaData
          extended by org.jboss.beans.metadata.plugins.AbstractParameterMetaData
All Implemented Interfaces:
Serializable, Cloneable, TypeProvider, ValueMetaDataAware, FeatureMetaData, MetaDataVisitorNode, ParameterMetaData, org.jboss.util.JBossInterface
Direct Known Subclasses:
AbstractConstructorArg

public class AbstractParameterMetaData
extends AbstractFeatureMetaData
implements ParameterMetaData, ValueMetaDataAware, Serializable

Metadata for a parameter.

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

Field Summary
protected  int index
          The index in parameter list
protected  Boolean replace
          Whether to replace
protected  Boolean trim
          Whether to trim
protected  String type
          The parameter type
protected  ValueMetaData value
          The parameter value
 
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
AbstractParameterMetaData()
          Create a new parameter meta data
AbstractParameterMetaData(Object value)
          Create a new parameter meta data
AbstractParameterMetaData(String type, Object value)
          Create a new parameter meta data
AbstractParameterMetaData(String type, String value)
          Create a new parameter meta data
AbstractParameterMetaData(String type, ValueMetaData value)
          Create a new parameter meta data
AbstractParameterMetaData(ValueMetaData value)
          Create a new parameter meta data
 
Method Summary
protected  void addChildren(Set<MetaDataVisitorNode> children)
           
 AbstractParameterMetaData clone()
          Clone the object
 int getIndex()
          Get the index
 String getType()
          Get the type.
 org.jboss.reflect.spi.TypeInfo getType(MetaDataVisitor visitor, MetaDataVisitorNode previous)
          Get the injectee type info.
 ValueMetaData getValue()
          Get the value.
 void initialVisit(MetaDataVisitor visitor)
          Visit the node
 void setIndex(int index)
          Set the index
 void setPropertyReplace(boolean replace)
           
 void setPropertyTrim(boolean trim)
           
 void setType(String type)
           
 void setValue(ValueMetaData value)
          Set the value.
 void setValueObject(Object value)
           
 void setValueString(String value)
           
 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

type

protected String type
The parameter type


value

protected ValueMetaData value
The parameter value


index

protected int index
The index in parameter list


replace

protected Boolean replace
Whether to replace


trim

protected Boolean trim
Whether to trim

Constructor Detail

AbstractParameterMetaData

public AbstractParameterMetaData()
Create a new parameter meta data


AbstractParameterMetaData

public AbstractParameterMetaData(Object value)
Create a new parameter meta data

Parameters:
value - the value

AbstractParameterMetaData

public AbstractParameterMetaData(ValueMetaData value)
Create a new parameter meta data

Parameters:
value - the value metadata

AbstractParameterMetaData

public AbstractParameterMetaData(String type,
                                 Object value)
Create a new parameter meta data

Parameters:
type - the type
value - the value

AbstractParameterMetaData

public AbstractParameterMetaData(String type,
                                 String value)
Create a new parameter meta data

Parameters:
type - the type
value - the string value

AbstractParameterMetaData

public AbstractParameterMetaData(String type,
                                 ValueMetaData value)
Create a new parameter meta data

Parameters:
type - the type
value - the value meta data
Method Detail

getType

public String getType()
Description copied from interface: ParameterMetaData
Get the type.

Specified by:
getType in interface ParameterMetaData
Returns:
the type.

setType

public void setType(String type)

getValue

public ValueMetaData getValue()
Description copied from interface: ParameterMetaData
Get the value.

Specified by:
getValue in interface ValueMetaDataAware
Specified by:
getValue in interface ParameterMetaData
Returns:
the value.

getIndex

public int getIndex()
Description copied from interface: ParameterMetaData
Get the index

Specified by:
getIndex in interface ParameterMetaData
Returns:
index in list

setIndex

public void setIndex(int index)
Description copied from interface: ParameterMetaData
Set the index

Specified by:
setIndex in interface ParameterMetaData
Parameters:
index - the index

setValue

public void setValue(ValueMetaData value)
Description copied from interface: ValueMetaDataAware
Set the value.

Specified by:
setValue in interface ValueMetaDataAware
Parameters:
value - the value

setValueObject

public void setValueObject(Object value)

setValueString

public void setValueString(String value)

setPropertyReplace

public void setPropertyReplace(boolean replace)

setPropertyTrim

public void setPropertyTrim(boolean trim)

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

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 AbstractParameterMetaData 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.