org.jboss.beans.metadata.plugins
Class AbstractPropertyMetaData

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.beans.metadata.plugins.AbstractFeatureMetaData
          extended by org.jboss.beans.metadata.plugins.AbstractPropertyMetaData
All Implemented Interfaces:
Serializable, Cloneable, TypeProvider, ValueMetaDataAware, FeatureMetaData, MetaDataVisitorNode, PropertyMetaData, org.jboss.util.JBossInterface

public class AbstractPropertyMetaData
extends AbstractFeatureMetaData
implements PropertyMetaData, ValueMetaDataAware, TypeProvider, Serializable

Metadata for a property.

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

Field Summary
protected  String name
          The property name
protected  boolean preInstantiate
          The preinstantiate
protected  ValueMetaData value
          The property value
 
Fields inherited from class org.jboss.beans.metadata.plugins.AbstractFeatureMetaData
annotations, description
 
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
AbstractPropertyMetaData()
          Create a new property meta data
AbstractPropertyMetaData(String name, Object value)
          Create a new property meta data
AbstractPropertyMetaData(String name, String value)
          Create a new property meta data
AbstractPropertyMetaData(String name, String value, String type)
          Create a new property meta data
AbstractPropertyMetaData(String name, ValueMetaData value)
          Create a new attribute meta data
 
Method Summary
 void addChildren(Set<MetaDataVisitorNode> children)
           
 String getName()
          Get the name.
 String getType()
          Get property type if possible.
 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
 boolean isPreInstantiate()
          Get the preinstantiate flag.
 void setName(String name)
          Set the name
 void setPreInstantiate(boolean preInstantiate)
           
 void setValue(ValueMetaData value)
          Set the 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, getAnnotations, getChildren, getDescription, setAnnotations, setDescription
 
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.beans.metadata.spi.FeatureMetaData
getAnnotations, getDescription
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString
 
Methods inherited from interface org.jboss.beans.metadata.spi.MetaDataVisitorNode
describeVisit, getChildren
 

Field Detail

name

protected String name
The property name


preInstantiate

protected boolean preInstantiate
The preinstantiate


value

protected ValueMetaData value
The property value

Constructor Detail

AbstractPropertyMetaData

public AbstractPropertyMetaData()
Create a new property meta data


AbstractPropertyMetaData

public AbstractPropertyMetaData(String name,
                                Object value)
Create a new property meta data

Parameters:
name - the name
value - the value

AbstractPropertyMetaData

public AbstractPropertyMetaData(String name,
                                String value)
Create a new property meta data

Parameters:
name - the name
value - the string value

AbstractPropertyMetaData

public AbstractPropertyMetaData(String name,
                                ValueMetaData value)
Create a new attribute meta data

Parameters:
name - the name
value - the value meta data

AbstractPropertyMetaData

public AbstractPropertyMetaData(String name,
                                String value,
                                String type)
Create a new property meta data

Parameters:
name - the name
value - the string value
type - the type
Method Detail

getName

public String getName()
Description copied from interface: PropertyMetaData
Get the name.

Specified by:
getName in interface PropertyMetaData
Returns:
the name.

setName

public void setName(String name)
Set the name

Parameters:
name - the name

getType

public String getType()
Description copied from interface: PropertyMetaData
Get property type if possible.

Specified by:
getType in interface PropertyMetaData
Returns:
class type if set, otherwise null

isPreInstantiate

public boolean isPreInstantiate()
Description copied from interface: PropertyMetaData
Get the preinstantiate flag.

Specified by:
isPreInstantiate in interface PropertyMetaData
Returns:
the preinstantiate flag

setPreInstantiate

public void setPreInstantiate(boolean preInstantiate)

getValue

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

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

setValue

public void setValue(ValueMetaData value)
Set the value

Specified by:
setValue in interface ValueMetaDataAware
Parameters:
value - the 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 AbstractFeatureMetaData
Parameters:
visitor - the visitor

addChildren

public 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


Copyright ? 2007 JBoss Inc.. All Rights Reserved.