/** * * Returns the BeanInfo for the class **/ BeanInfo getBeanInfo (Logger pLogger) throws ELException { checkInitialized (pLogger); return mBeanInfo; }
/** * * Returns the BeanInfoManager for the specified class **/ public static BeanInfoManager getBeanInfoManager (Class pClass) { BeanInfoManager ret = (BeanInfoManager) mBeanInfoManagerByClass.get (pClass); if (ret == null) { ret = createBeanInfoManager (pClass); } return ret; }
/** * * Returns the BeanInfoProperty for the specified property in the * given class, or null if not found. **/ public static BeanInfoProperty getBeanInfoProperty (Class pClass, String pPropertyName, Logger pLogger) throws ELException { return getBeanInfoManager (pClass).getProperty (pPropertyName, pLogger); }
/** * * Returns the BeanInfoIndexedProperty for the specified property in * the given class, or null if not found. **/ public static BeanInfoIndexedProperty getBeanInfoIndexedProperty (Class pClass, String pIndexedPropertyName, Logger pLogger) throws ELException { return getBeanInfoManager (pClass).getIndexedProperty (pIndexedPropertyName, pLogger); }
/** * * Returns a publicly-accessible version of the given method, by * searching for a public declaring class. **/ static Method getPublicMethod (Method pMethod) { if (pMethod == null) { return null; } // See if the method is already available from a public class Class cl = pMethod.getDeclaringClass (); if (Modifier.isPublic (cl.getModifiers ())) { return pMethod; } // Otherwise, try to find a public class that declares the method Method ret = getPublicMethod (cl, pMethod); if (ret != null) { return ret; } else { return pMethod; } }
/** * * Makes sure that this class has been initialized, and synchronizes * the initialization if it's required. **/ void checkInitialized (Logger pLogger) throws ELException { if (!mInitialized) { synchronized (this) { if (!mInitialized) { initialize (pLogger); mInitialized = true; } } } }
/** * * Creates and registers the BeanInfoManager for the given class if * it isn't already registered. **/ static synchronized BeanInfoManager createBeanInfoManager (Class pClass) { // Because this method is synchronized statically, the // BeanInfoManager is not initialized at this time (otherwise it // could end up being a bottleneck for the entire system). It is // put into the map in an uninitialized state. The first time // someone tries to use it, it will be initialized (with proper // synchronizations in place to make sure it is only initialized // once). BeanInfoManager ret = (BeanInfoManager) mBeanInfoManagerByClass.get (pClass); if (ret == null) { ret = new BeanInfoManager (pClass); mBeanInfoManagerByClass.put (pClass, ret); } return ret; }
else if ((property = BeanInfoManager.getBeanInfoProperty (pValue.getClass (), indexStr,
if (interfaces != null) { for (int i = 0; i < interfaces.length; i++) { Method m = getPublicMethod (interfaces [i], pMethod); if (m != null) { return m; Method m = getPublicMethod (superclass, pMethod); if (m != null) { return m;
/** * * Returns the BeanInfoProperty for the given property name, or null * if not found. **/ public BeanInfoProperty getProperty (String pPropertyName, Logger pLogger) throws ELException { checkInitialized (pLogger); return (BeanInfoProperty) mPropertyByName.get (pPropertyName); }
if (pd instanceof IndexedPropertyDescriptor) { IndexedPropertyDescriptor ipd = (IndexedPropertyDescriptor) pd; Method readMethod = getPublicMethod (ipd.getIndexedReadMethod ()); Method writeMethod = getPublicMethod (ipd.getIndexedWriteMethod ()); BeanInfoIndexedProperty property = new BeanInfoIndexedProperty (readMethod, Method readMethod = getPublicMethod (pd.getReadMethod ()); Method writeMethod = getPublicMethod (pd.getWriteMethod ()); BeanInfoProperty property = new BeanInfoProperty (readMethod,
/** * * Returns the EventSetDescriptor for the given event set name, or * null if not found. **/ public EventSetDescriptor getEventSet (String pEventSetName, Logger pLogger) throws ELException { checkInitialized (pLogger); return (EventSetDescriptor) mEventSetByName.get (pEventSetName); }
/** * * Returns the BeanInfoIndexedProperty for the given property name, * or null if not found. **/ public BeanInfoIndexedProperty getIndexedProperty (String pIndexedPropertyName, Logger pLogger) throws ELException { checkInitialized (pLogger); return (BeanInfoIndexedProperty) mIndexedPropertyByName.get (pIndexedPropertyName); }