org.jboss.beans.info.plugins
Class AbstractBeanInfoFactory

java.lang.Object
  extended by org.jboss.beans.info.plugins.AbstractBeanInfoFactory
All Implemented Interfaces:
BeanInfoFactory

public class AbstractBeanInfoFactory
extends Object
implements BeanInfoFactory

A bean info factory.

Version:
$Revision: 81547 $
Author:
Adrian Brock, Ales Justin

Field Summary
protected  Map<ClassLoader,Map<ClassInfo,Map<BeanAccessMode,BeanInfo>>> cache
          The cache
 
Constructor Summary
AbstractBeanInfoFactory()
          Create a new bean info factory
 
Method Summary
protected  BeanInfo createBeanInfo(ClassAdapter classAdapter, BeanAccessMode accessMode, Set<PropertyInfo> properties, Set<ConstructorInfo> constructors, Set<MethodInfo> methods, Set<EventInfo> events)
          Create the bean info
protected  Set<PropertyInfo> getAnnotationProperties(Set<MethodInfo> methods)
          Get the properties for an annotation
 BeanInfo getBeanInfo(ClassAdapter classAdapter)
          Retrieve the bean information
 BeanInfo getBeanInfo(ClassAdapter classAdapter, BeanAccessMode accessMode)
          Retrieve the bean information
protected  Set<PropertyInfo> getBeanProperties(Set<MethodInfo> methods)
          Get the properties for a bean
protected  Set<ConstructorInfo> getConstructors(ClassInfo classInfo)
          Get the constructors
protected  Set<EventInfo> getEvents(ClassInfo classInfo)
          Get the events
protected static String getLowerPropertyName(String name)
           
protected  Set<MethodInfo> getMethods(ClassInfo classInfo)
          Get the methods
protected  TypeInfo getPropertyType(MethodInfo getter, MethodInfo setter)
          Determine the type of PropertyInfo.
protected static String getUpperPropertyName(String name)
           
protected static boolean isGetter(MethodInfo minfo)
           
protected static boolean isSetter(MethodInfo minfo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

cache

protected Map<ClassLoader,Map<ClassInfo,Map<BeanAccessMode,BeanInfo>>> cache
The cache

Constructor Detail

AbstractBeanInfoFactory

public AbstractBeanInfoFactory()
Create a new bean info factory

Method Detail

isGetter

protected static boolean isGetter(MethodInfo minfo)

isSetter

protected static boolean isSetter(MethodInfo minfo)

getUpperPropertyName

protected static String getUpperPropertyName(String name)

getLowerPropertyName

protected static String getLowerPropertyName(String name)

getBeanInfo

public BeanInfo getBeanInfo(ClassAdapter classAdapter)
Description copied from interface: BeanInfoFactory
Retrieve the bean information

Specified by:
getBeanInfo in interface BeanInfoFactory
Parameters:
classAdapter - the classAdapter
Returns:
the bean information

getBeanInfo

public BeanInfo getBeanInfo(ClassAdapter classAdapter,
                            BeanAccessMode accessMode)
Description copied from interface: BeanInfoFactory
Retrieve the bean information

Specified by:
getBeanInfo in interface BeanInfoFactory
Parameters:
classAdapter - the classAdapter
accessMode - the access mode
Returns:
the bean information

createBeanInfo

protected BeanInfo createBeanInfo(ClassAdapter classAdapter,
                                  BeanAccessMode accessMode,
                                  Set<PropertyInfo> properties,
                                  Set<ConstructorInfo> constructors,
                                  Set<MethodInfo> methods,
                                  Set<EventInfo> events)
Create the bean info

Parameters:
classAdapter - the class adapter
accessMode - the access mode
properties - the properties
constructors - the constructors
methods - the methods
events - the events
Returns:
the bean info

getConstructors

protected Set<ConstructorInfo> getConstructors(ClassInfo classInfo)
Get the constructors

Parameters:
classInfo - the class info
Returns:
the constructors

getMethods

protected Set<MethodInfo> getMethods(ClassInfo classInfo)
Get the methods

Parameters:
classInfo - the class info
Returns:
the methods

getBeanProperties

protected Set<PropertyInfo> getBeanProperties(Set<MethodInfo> methods)
Get the properties for a bean

Parameters:
methods - the methods
Returns:
the properties

getPropertyType

protected TypeInfo getPropertyType(MethodInfo getter,
                                   MethodInfo setter)
Determine the type of PropertyInfo.

Parameters:
getter - the getter
setter - the setter
Returns:
property type

getAnnotationProperties

protected Set<PropertyInfo> getAnnotationProperties(Set<MethodInfo> methods)
Get the properties for an annotation

Parameters:
methods - the methods
Returns:
the properties

getEvents

protected Set<EventInfo> getEvents(ClassInfo classInfo)
Get the events

Parameters:
classInfo - the class info
Returns:
the events


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