com.codereligion.reflect
Class GenericTypeAwareBeanInfo

java.lang.Object
  extended by com.codereligion.reflect.internal.ForwardingBeanInfo
      extended by com.codereligion.reflect.GenericTypeAwareBeanInfo
All Implemented Interfaces:
BeanInfo

public final class GenericTypeAwareBeanInfo
extends com.codereligion.reflect.internal.ForwardingBeanInfo

A decorator for a BeanInfo implementation that assures that known bugs with generics in Java version 1.6 do not occur when reading properties.

Since:
08.08.2013
Author:
Sebastian Gröbler

Field Summary
 
Fields inherited from interface java.beans.BeanInfo
ICON_COLOR_16x16, ICON_COLOR_32x32, ICON_MONO_16x16, ICON_MONO_32x32
 
Method Summary
protected  BeanInfo delegate()
           
 PropertyDescriptor[] getPropertyDescriptors()
           
static BeanInfo of(BeanInfo beanInfo)
          Creates a new instance which decorates the given beanInfo object.
 
Methods inherited from class com.codereligion.reflect.internal.ForwardingBeanInfo
getAdditionalBeanInfo, getBeanDescriptor, getDefaultEventIndex, getDefaultPropertyIndex, getEventSetDescriptors, getIcon, getMethodDescriptors, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

of

public static BeanInfo of(BeanInfo beanInfo)
Creates a new instance which decorates the given beanInfo object.

Parameters:
beanInfo - the BeanInfo implementation to decorate
Returns:
the generic type aware BeanInfo implementation
Throws:
NullPointerException - when the given parameter is null
IllegalArgumentException - when the given BeanInfo is already a GenericTypeAwareBeanInfo

delegate

protected BeanInfo delegate()
Specified by:
delegate in class com.codereligion.reflect.internal.ForwardingBeanInfo

getPropertyDescriptors

public PropertyDescriptor[] getPropertyDescriptors()
Specified by:
getPropertyDescriptors in interface BeanInfo
Overrides:
getPropertyDescriptors in class com.codereligion.reflect.internal.ForwardingBeanInfo


Copyright © 2013. All rights reserved.