Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
package org.apache.beehive.controls.system.ejb;
import java.beans.BeanDescriptor;
import java.beans.EventSetDescriptor;
import java.beans.IntrospectionException;
import java.beans.MethodDescriptor;
import java.beans.ParameterDescriptor;
import java.beans.PropertyDescriptor;
import java.beans.PropertyEditor;
import java.lang.reflect.Method;
import java.util.HashMap;
import org.apache.beehive.controls.api.ControlException;
import org.apache.beehive.controls.runtime.bean.BeanPersistenceDelegate;
import org.apache.beehive.controls.runtime.packaging.ControlEventSetDescriptor;
@SuppressWarnings("all")
public class EJBControlBeanBeanInfo
extends org.apache.beehive.controls.runtime.bean.ControlBeanInfo
{
static final Method _getEJBHomeInstanceMethod;
static final Method _getEJBExceptionMethod;
static final Method _getEJBBeanInstanceMethod;
static final Method _hasEJBBeanInstanceMethod;
//
// This HashMap will map from a Method to the array of names for parameters of the
// method. This is necessary because parameter name data isn't carried along in the
// class file, but if available can enable ease of use by referencing parameters by
// the declared name (vs. by index).
//
// This map should be read-only after its initialization in the static block, hence
// using a plain HashMap is thread-safe.
//
static HashMap _methodParamMap = new HashMap();
static
{
try
{
_getEJBHomeInstanceMethod = org.apache.beehive.controls.system.ejb.EJBControl.class.getMethod("getEJBHomeInstance", new Class [] {});
_methodParamMap.put(_getEJBHomeInstanceMethod, new String [] { });
_getEJBExceptionMethod = org.apache.beehive.controls.system.ejb.EJBControl.class.getMethod("getEJBException", new Class [] {});
_methodParamMap.put(_getEJBExceptionMethod, new String [] { });
_getEJBBeanInstanceMethod = org.apache.beehive.controls.system.ejb.EJBControl.class.getMethod("getEJBBeanInstance", new Class [] {});
_methodParamMap.put(_getEJBBeanInstanceMethod, new String [] { });
_hasEJBBeanInstanceMethod = org.apache.beehive.controls.system.ejb.EJBControl.class.getMethod("hasEJBBeanInstance", new Class [] {});
_methodParamMap.put(_hasEJBBeanInstanceMethod, new String [] { });
}
catch (NoSuchMethodException __bc_nsme)
{
throw new ExceptionInInitializerError(__bc_nsme);
}
}
/**
* Default null-arg constructor used to create a new BeanInfo instance
*/
public EJBControlBeanBeanInfo()
{
super(org.apache.beehive.controls.system.ejb.EJBControlBean.class);
}
/**
* Protected constructor used if this BeanInfo class is extended.
*/
protected EJBControlBeanBeanInfo(Class beanClass)
{
super(beanClass);
}
// java.beans.BeanInfo.getBeanDescriptor
public BeanDescriptor getBeanDescriptor()
{
BeanDescriptor bd = new BeanDescriptor(org.apache.beehive.controls.system.ejb.EJBControlBean.class);
bd.setName( "EJBControlBean" );
bd.setDisplayName( "EJBControlBean" );
//
// The org.apache.beehive.controls.runtime.bean.BeanPersistenceDelegate class
// implements the XMLDecode delegation model for all Control JavaBean types. It
// provides optimized XML persistance based upon the Control runtime architecture.
// The 'persistenceDelegate' attribute of a BeanDescriptor is used by XMLEncoder to
// locate a delegate for a particular JavaBean type.
//
bd.setValue("persistenceDelegate", new BeanPersistenceDelegate());
return bd;
}
/**
* Stores MethodDescriptor descriptors for this bean and its superclasses into
* an array, starting at the specified index
*/
protected void initMethodDescriptors(MethodDescriptor [] methodDescriptors, int index)
throws java.beans.IntrospectionException
{
String [] __bc_paramNames;
ParameterDescriptor [] __bc_paramDescriptors;
MethodDescriptor md;
//
// Declare MethodDescriptor for getEJBHomeInstance()
//
__bc_paramNames = _methodParamMap.get(_getEJBHomeInstanceMethod);
__bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
for (int j = 0; j < __bc_paramNames.length; j++)
{
__bc_paramDescriptors[j] = new ParameterDescriptor();
__bc_paramDescriptors[j].setName(__bc_paramNames[j]);
__bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
}
md = new MethodDescriptor(_getEJBHomeInstanceMethod, __bc_paramDescriptors);
methodDescriptors[index++] = md;
//
// Declare MethodDescriptor for getEJBException()
//
__bc_paramNames = _methodParamMap.get(_getEJBExceptionMethod);
__bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
for (int j = 0; j < __bc_paramNames.length; j++)
{
__bc_paramDescriptors[j] = new ParameterDescriptor();
__bc_paramDescriptors[j].setName(__bc_paramNames[j]);
__bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
}
md = new MethodDescriptor(_getEJBExceptionMethod, __bc_paramDescriptors);
methodDescriptors[index++] = md;
//
// Declare MethodDescriptor for getEJBBeanInstance()
//
__bc_paramNames = _methodParamMap.get(_getEJBBeanInstanceMethod);
__bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
for (int j = 0; j < __bc_paramNames.length; j++)
{
__bc_paramDescriptors[j] = new ParameterDescriptor();
__bc_paramDescriptors[j].setName(__bc_paramNames[j]);
__bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
}
md = new MethodDescriptor(_getEJBBeanInstanceMethod, __bc_paramDescriptors);
methodDescriptors[index++] = md;
//
// Declare MethodDescriptor for hasEJBBeanInstance()
//
__bc_paramNames = _methodParamMap.get(_hasEJBBeanInstanceMethod);
__bc_paramDescriptors = new ParameterDescriptor[__bc_paramNames.length];
for (int j = 0; j < __bc_paramNames.length; j++)
{
__bc_paramDescriptors[j] = new ParameterDescriptor();
__bc_paramDescriptors[j].setName(__bc_paramNames[j]);
__bc_paramDescriptors[j].setDisplayName(__bc_paramNames[j]);
}
md = new MethodDescriptor(_hasEJBBeanInstanceMethod, __bc_paramDescriptors);
methodDescriptors[index++] = md;
}
public MethodDescriptor [] getMethodDescriptors()
{
MethodDescriptor [] __bc_methodDescriptors = new MethodDescriptor[4];
try
{
initMethodDescriptors(__bc_methodDescriptors, 0);
}
catch (java.beans.IntrospectionException __bc_ie)
{
throw new ControlException("Unable to create MethodDescriptor", __bc_ie);
}
return __bc_methodDescriptors;
}
/**
* Stores PropertyDescriptor descriptors for this bean and its superclasses into
* an array, starting at the specified index
*/
protected void initPropertyDescriptors(PropertyDescriptor [] propDescriptors, int index)
throws java.beans.IntrospectionException
{
PropertyDescriptor pd;
pd = new PropertyDescriptor( "controlImplementation" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getControlImplementation", "setControlImplementation");
propDescriptors[index++] = pd;
pd = new PropertyDescriptor( "ejbLink" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getEjbLink", "setEjbLink");
propDescriptors[index++] = pd;
pd = new PropertyDescriptor( "jndiName" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getJndiName", "setJndiName");
propDescriptors[index++] = pd;
pd = new PropertyDescriptor( "contextFactory" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getContextFactory", "setContextFactory");
propDescriptors[index++] = pd;
pd = new PropertyDescriptor( "credentials" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getCredentials", "setCredentials");
propDescriptors[index++] = pd;
pd = new PropertyDescriptor( "principal" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getPrincipal", "setPrincipal");
propDescriptors[index++] = pd;
pd = new PropertyDescriptor( "providerURL" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getProviderURL", "setProviderURL");
propDescriptors[index++] = pd;
//
// add property descriptors for any getter/setters defined in control interface
//
pd = new PropertyDescriptor( "eJBHomeInstance" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getEJBHomeInstance", null);
propDescriptors[index++] = pd;
pd = new PropertyDescriptor( "eJBException" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getEJBException", null);
propDescriptors[index++] = pd;
pd = new PropertyDescriptor( "eJBBeanInstance" , org.apache.beehive.controls.system.ejb.EJBControlBean.class, "getEJBBeanInstance", null);
propDescriptors[index++] = pd;
}
// java.beans.BeanInfo.getPropertyDescriptors
public PropertyDescriptor [] getPropertyDescriptors()
{
PropertyDescriptor [] __bc_propDescriptors = new PropertyDescriptor[10];
try
{
initPropertyDescriptors(__bc_propDescriptors, 0);
}
catch (java.beans.IntrospectionException __bc_ie)
{
throw new ControlException("Unable to create PropertyDescriptor", __bc_ie);
}
return __bc_propDescriptors;
}
protected void initEventSetDescriptors(EventSetDescriptor [] eventSetDescriptors, int index)
throws java.beans.IntrospectionException
{
}
// java.beans.BeanInfo.getEventSetDescriptors
public EventSetDescriptor [] getEventSetDescriptors()
{
EventSetDescriptor [] __bc_eventSetDescriptors = new EventSetDescriptor[0];
try
{
initEventSetDescriptors(__bc_eventSetDescriptors, 0);
}
catch (java.beans.IntrospectionException __bc_ie)
{
throw new ControlException("Unable to create EventSetDescriptor", __bc_ie);
}
return __bc_eventSetDescriptors;
}
}