// Decompiled by DJ v3.2.2.67 Copyright 2002 Atanas Neshkov  Date: 07/07/2004 11:55:44
package es.ejie.frmk.presentacion.iu.taglib.html.table;

import java.beans.IntrospectionException;
import java.beans.PropertyDescriptor;
import java.beans.SimpleBeanInfo;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.Iterator;

public class Q70BeanInfoUtil extends SimpleBeanInfo
{

    public Q70BeanInfoUtil()
    {
    }

    public final PropertyDescriptor[] getPropertyDescriptors()
    {
        ArrayList pdArray = new ArrayList();
        String className = getClass().getName();
        className = className.substring(0, className.indexOf("BeanInfo"));
        Class tagClass = null;
        try
        {
	    tagClass = applicationClass(className); 
        }
        catch(ClassNotFoundException ex1)
        {
            
        }
	catch(ExceptionInInitializerError ex2)
        {
            
        }
	catch(Exception ex2)
        {
            
        }
  if (tagClass!=null)
  {	
        Method methods[] = tagClass.getMethods();
        int numberOfMethods = methods.length;
        for(int j = 0; j < numberOfMethods; j++)
        {
            Method meth = methods[j];
            String methodName;
            if(meth.getParameterTypes().length == 1 && (methodName = meth.getName()).indexOf("set") == 0 && methodName.length() > 3 && Character.isUpperCase(methodName.charAt(3)))
            {
                String attributeName = Character.toLowerCase(methodName.charAt(3)) + methodName.substring(4);
                try
                {
                    pdArray.add(new PropertyDescriptor(attributeName, null, meth));
                }
                catch(IntrospectionException ex) { }
            }
        }

        PropertyDescriptor pd[] = new PropertyDescriptor[pdArray.size()];
        Iterator iterator = pdArray.iterator();
        for(int pdCount = 0; iterator.hasNext(); pdCount++)
            pd[pdCount] = (PropertyDescriptor)iterator.next();

        return pd;
    
  }
  else
  {
	return 	null;
  }
}

    static Class _mthclass$(String x0)
    {
        try {
           return applicationClass(x0);
        } catch (ClassNotFoundException x1) {
           throw new NoClassDefFoundError(x1.getMessage());
        }
        /*return Class.forName(x0);
        ClassNotFoundException x1;
        x1;
        throw new NoClassDefFoundError(x1.getMessage());*/
    }

    private static Class applicationClass(String className) throws ClassNotFoundException
	{

		// Look up the class loader to be used
		ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
		if (classLoader == null)
		{
			classLoader = Q70BeanInfoUtil.class.getClassLoader();
		}
		// Attempt to load the specified class
		return (classLoader.loadClass(className));

	}

}
