org.apache.commons.el

Class BeanInfoManager


public class BeanInfoManager
extends java.lang.Object

Manages the BeanInfo for one class - contains the BeanInfo, and also a mapping from property name to BeanInfoProperty. There are also static methods for accessing the BeanInfoManager for a class - those mappings are cached permanently so that once the BeanInfoManager is calculated, it doesn't have to be calculated again.
Version:
$Change: 181181 $$DateTime: 2001/06/26 09:55:09 $$Author: luehe $
Author:
Nathan Abramson - Art Technology Group

Field Summary

(package private) Class
mBeanClass
(package private) BeanInfo
mBeanInfo
(package private) static Map
mBeanInfoManagerByClass
(package private) Map
mEventSetByName
(package private) Map
mIndexedPropertyByName
(package private) boolean
mInitialized
(package private) Map
mPropertyByName

Constructor Summary

BeanInfoManager(Class pBeanClass)
Constructor

Method Summary

(package private) void
checkInitialized(Logger pLogger)
Makes sure that this class has been initialized, and synchronizes the initialization if it's required.
(package private) static BeanInfoManager
createBeanInfoManager(Class pClass)
Creates and registers the BeanInfoManager for the given class if it isn't already registered.
Class
getBeanClass()
(package private) BeanInfo
getBeanInfo(Logger pLogger)
Returns the BeanInfo for the class
static BeanInfoIndexedProperty
getBeanInfoIndexedProperty(Class pClass, String pIndexedPropertyName, Logger pLogger)
Returns the BeanInfoIndexedProperty for the specified property in the given class, or null if not found.
static BeanInfoManager
getBeanInfoManager(Class pClass)
Returns the BeanInfoManager for the specified class
static BeanInfoProperty
getBeanInfoProperty(Class pClass, String pPropertyName, Logger pLogger)
Returns the BeanInfoProperty for the specified property in the given class, or null if not found.
EventSetDescriptor
getEventSet(String pEventSetName, Logger pLogger)
Returns the EventSetDescriptor for the given event set name, or null if not found.
BeanInfoIndexedProperty
getIndexedProperty(String pIndexedPropertyName, Logger pLogger)
Returns the BeanInfoIndexedProperty for the given property name, or null if not found.
BeanInfoProperty
getProperty(String pPropertyName, Logger pLogger)
Returns the BeanInfoProperty for the given property name, or null if not found.
(package private) static Method
getPublicMethod(Class pClass, Method pMethod)
If the given class is public and has a Method that declares the same name and arguments as the given method, then that method is returned.
(package private) static Method
getPublicMethod(Method pMethod)
Returns a publicly-accessible version of the given method, by searching for a public declaring class.
(package private) void
initialize(Logger pLogger)
Initializes by mapping property names to BeanInfoProperties

Field Details

mBeanClass

(package private)  Class mBeanClass

mBeanInfo

(package private)  BeanInfo mBeanInfo

mBeanInfoManagerByClass

(package private) static Map mBeanInfoManagerByClass

mEventSetByName

(package private)  Map mEventSetByName

mIndexedPropertyByName

(package private)  Map mIndexedPropertyByName

mInitialized

(package private)  boolean mInitialized

mPropertyByName

(package private)  Map mPropertyByName

Constructor Details

BeanInfoManager

(package private)  BeanInfoManager(Class pBeanClass)
Constructor

Method Details

checkInitialized

(package private)  void checkInitialized(Logger pLogger)
            throws ELException
Makes sure that this class has been initialized, and synchronizes the initialization if it's required.

createBeanInfoManager

(package private) static BeanInfoManager createBeanInfoManager(Class pClass)
Creates and registers the BeanInfoManager for the given class if it isn't already registered.

getBeanClass

public Class getBeanClass()

getBeanInfo

(package private)  BeanInfo getBeanInfo(Logger pLogger)
            throws ELException
Returns the BeanInfo for the class

getBeanInfoIndexedProperty

public static BeanInfoIndexedProperty getBeanInfoIndexedProperty(Class pClass,
                                                                 String pIndexedPropertyName,
                                                                 Logger pLogger)
            throws ELException
Returns the BeanInfoIndexedProperty for the specified property in the given class, or null if not found.

getBeanInfoManager

public static BeanInfoManager getBeanInfoManager(Class pClass)
Returns the BeanInfoManager for the specified class

getBeanInfoProperty

public static BeanInfoProperty getBeanInfoProperty(Class pClass,
                                                   String pPropertyName,
                                                   Logger pLogger)
            throws ELException
Returns the BeanInfoProperty for the specified property in the given class, or null if not found.

getEventSet

public EventSetDescriptor getEventSet(String pEventSetName,
                                      Logger pLogger)
            throws ELException
Returns the EventSetDescriptor for the given event set name, or null if not found.

getIndexedProperty

public BeanInfoIndexedProperty getIndexedProperty(String pIndexedPropertyName,
                                                  Logger pLogger)
            throws ELException
Returns the BeanInfoIndexedProperty for the given property name, or null if not found.

getProperty

public BeanInfoProperty getProperty(String pPropertyName,
                                    Logger pLogger)
            throws ELException
Returns the BeanInfoProperty for the given property name, or null if not found.

getPublicMethod

(package private) static Method getPublicMethod(Class pClass,
                                                Method pMethod)
If the given class is public and has a Method that declares the same name and arguments as the given method, then that method is returned. Otherwise the superclass and interfaces are searched recursively.

getPublicMethod

(package private) static Method getPublicMethod(Method pMethod)
Returns a publicly-accessible version of the given method, by searching for a public declaring class.

initialize

(package private)  void initialize(Logger pLogger)
            throws ELException
Initializes by mapping property names to BeanInfoProperties

Copyright (c) 2001-2002 - Apache Software Foundation