org.jboss.beans.info.plugins
Class DefaultPropertyInfo

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
                  extended by org.jboss.beans.info.plugins.DefaultPropertyInfo
All Implemented Interfaces:
Serializable, Cloneable, PropertyInfo, AnnotatedInfo, org.jboss.util.JBossInterface

public class DefaultPropertyInfo
extends AbstractPropertyInfo

Default property info.

Author:
Ales Justin
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.jboss.reflect.plugins.AnnotationHolder
annotationMap, annotationsArray
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
DefaultPropertyInfo()
          Create a new property info
DefaultPropertyInfo(String name)
          Create a new property info
DefaultPropertyInfo(String name, String upperName, TypeInfo type, MethodInfo getter, MethodInfo setter)
          Create a new property info
DefaultPropertyInfo(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
 MethodInfo getGetter()
          Get the getter
 MethodInfo getSetter()
          Get the setter
 boolean isReadable()
          Is property readable.
 boolean isWritable()
          Is property writable.
 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 toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.beans.info.plugins.AbstractPropertyInfo
getBeanInfo, getFieldInfo, getHashCode, getName, getType, getUpperName, init, setType, toShortString
 
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
 

Constructor Detail

DefaultPropertyInfo

public DefaultPropertyInfo()
Create a new property info


DefaultPropertyInfo

public DefaultPropertyInfo(String name)
Create a new property info

Parameters:
name - the name

DefaultPropertyInfo

public DefaultPropertyInfo(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

DefaultPropertyInfo

public DefaultPropertyInfo(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

getGetter

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

Returns:
the getter

setGetter

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

Parameters:
getter - the getter

getSetter

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

Returns:
the setter

setSetter

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

Parameters:
setter - the setter

isReadable

public boolean isReadable()
Description copied from interface: PropertyInfo
Is property readable.

Returns:
true if the property is readable

isWritable

public boolean isWritable()
Description copied from interface: PropertyInfo
Is property writable.

Returns:
true if the property is writable

get

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

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

Parameters:
bean - the bean
value - the property value
Throws:
Throwable - for any error

equals

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

toString

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


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