org.jboss.beans.info.plugins
Class AbstractPropertyInfo

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.reflect.plugins.AbstractAnnotatedInfo
          extended by org.jboss.reflect.plugins.AnnotationHolder
              extended by org.jboss.beans.info.plugins.AbstractPropertyInfo
All Implemented Interfaces:
Serializable, Cloneable, PropertyInfo, AnnotatedInfo, org.jboss.util.JBossInterface

public class AbstractPropertyInfo
extends AnnotationHolder
implements PropertyInfo, Serializable

Property info.

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

Field Summary
protected  BeanInfo beanInfo
          The bean info
protected  MethodInfo getter
          The getter
protected  String name
          The property name
protected  MethodInfo setter
          The setter
protected  TypeInfo type
          The type
protected  String upperName
          The upper property name
 
Fields inherited from class org.jboss.reflect.plugins.AnnotationHolder
annotationMap, annotationsArray
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
AbstractPropertyInfo()
          Create a new property info
AbstractPropertyInfo(String name)
          Create a new property info
AbstractPropertyInfo(String name, String upperName, TypeInfo type, MethodInfo getter, MethodInfo setter)
          Create a new property info
AbstractPropertyInfo(String name, String upperName, TypeInfo type, MethodInfo getter, MethodInfo setter, AnnotationValue[] annotations)
          Create a new property info
 
Method Summary
 boolean equals(Object object)
           
 Object get(Object bean)
          Get the property value
 BeanInfo getBeanInfo()
          Get the BeanInfo
 MethodInfo getGetter()
          Get the getter
 int getHashCode()
           
 String getName()
          Get the property name
 MethodInfo getSetter()
          Get the setter
 TypeInfo getType()
          Get the type
 String getUpperName()
          Get the uppercase version of the property name
 void set(Object bean, Object value)
          Set the property value
 void setGetter(MethodInfo getter)
          Set the getter
 void setSetter(MethodInfo setter)
          Set the setter
 void setType(TypeInfo type)
           
 void toShortString(org.jboss.util.JBossStringBuilder buffer)
           
 void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.reflect.plugins.AnnotationHolder
getAnnotation, getAnnotations, isAnnotationPresent, setupAnnotations
 
Methods inherited from class org.jboss.reflect.plugins.AbstractAnnotatedInfo
getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, 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.reflect.spi.AnnotatedInfo
getAnnotation, getAnnotations, getUnderlyingAnnotation, getUnderlyingAnnotations, isAnnotationPresent, isAnnotationPresent
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString
 

Field Detail

beanInfo

protected transient BeanInfo beanInfo
The bean info


name

protected String name
The property name


upperName

protected String upperName
The upper property name


type

protected TypeInfo type
The type


getter

protected MethodInfo getter
The getter


setter

protected MethodInfo setter
The setter

Constructor Detail

AbstractPropertyInfo

public AbstractPropertyInfo()
Create a new property info


AbstractPropertyInfo

public AbstractPropertyInfo(String name)
Create a new property info

Parameters:
name - the name

AbstractPropertyInfo

public AbstractPropertyInfo(String name,
                            String upperName,
                            TypeInfo type,
                            MethodInfo getter,
                            MethodInfo setter)
Create a new property info

Parameters:
name - the name
upperName - the upper case version of the name
type - the type
getter - the getter
setter - the setter

AbstractPropertyInfo

public AbstractPropertyInfo(String name,
                            String upperName,
                            TypeInfo type,
                            MethodInfo getter,
                            MethodInfo setter,
                            AnnotationValue[] annotations)
Create a new property info

Parameters:
name - the name
upperName - the upper case version of the name
type - the type
getter - the getter
setter - the setter
annotations - the annotations
Method Detail

getBeanInfo

public BeanInfo getBeanInfo()
Description copied from interface: PropertyInfo
Get the BeanInfo

Specified by:
getBeanInfo in interface PropertyInfo
Returns:
the bean info

getName

public String getName()
Description copied from interface: PropertyInfo
Get the property name

Specified by:
getName in interface PropertyInfo
Returns:
the name

getUpperName

public String getUpperName()
Description copied from interface: PropertyInfo
Get the uppercase version of the property name

Specified by:
getUpperName in interface PropertyInfo
Returns:
the name

getType

public TypeInfo getType()
Description copied from interface: PropertyInfo
Get the type

Specified by:
getType in interface PropertyInfo
Returns:
the type

setType

public void setType(TypeInfo type)

getGetter

public MethodInfo getGetter()
Description copied from interface: PropertyInfo
Get the getter

Specified by:
getGetter in interface PropertyInfo
Returns:
the getter

setGetter

public void setGetter(MethodInfo getter)
Description copied from interface: PropertyInfo
Set the getter

Specified by:
setGetter in interface PropertyInfo
Parameters:
getter - the getter

getSetter

public MethodInfo getSetter()
Description copied from interface: PropertyInfo
Get the setter

Specified by:
getSetter in interface PropertyInfo
Returns:
the setter

setSetter

public void setSetter(MethodInfo setter)
Description copied from interface: PropertyInfo
Set the setter

Specified by:
setSetter in interface PropertyInfo
Parameters:
setter - the setter

get

public Object get(Object bean)
           throws Throwable
Description copied from interface: PropertyInfo
Get the property value

Specified by:
get in interface PropertyInfo
Parameters:
bean - the bean
Returns:
the property value
Throws:
Throwable - for any error

set

public void set(Object bean,
                Object value)
         throws Throwable
Description copied from interface: PropertyInfo
Set the property value

Specified by:
set in interface PropertyInfo
Parameters:
bean - the bean
value - the property value
Throws:
Throwable - for any error

equals

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

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

getHashCode

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


Copyright © 2008 JBoss Inc.. All Rights Reserved.