org.jboss.beans.info.plugins
Class AbstractBeanInfo

java.lang.Object
  extended by org.jboss.util.JBossObject
      extended by org.jboss.beans.info.plugins.AbstractBeanInfo
All Implemented Interfaces:
Cloneable, BeanInfo, org.jboss.util.JBossInterface

public class AbstractBeanInfo
extends org.jboss.util.JBossObject
implements BeanInfo

BeanInfo.

Version:
$Revision: 70359 $
Author:
Adrian Brock

Field Summary
protected  BeanInfoFactory beanInfoFactory
          The BeanInfoFactory
protected  ClassAdapter classAdapter
          The class adapter
protected  Set<ConstructorInfo> constructors
          The constructors
protected  Set<EventInfo> events
          The events
protected  Set<MethodInfo> methods
          The methods
protected  String name
          The class name
protected  Set<PropertyInfo> properties
          The properties
 
Fields inherited from class org.jboss.util.JBossObject
hashCode, log, toString
 
Constructor Summary
AbstractBeanInfo(BeanInfoFactory beanInfoFactory, ClassAdapter classAdapter, Set<PropertyInfo> properties, Set<ConstructorInfo> constructors, Set<MethodInfo> methods, Set<EventInfo> events)
          Create a new bean info
 
Method Summary
 boolean equals(Object object)
           
 BeanInfoFactory getBeanInfoFactory()
          Get the bean info factory
 ClassInfo getClassInfo()
          Get the class information
 Set<ConstructorInfo> getConstructors()
          Get the constructor info.
 Set<EventInfo> getEvents()
          Get the event information.
 int getHashCode()
           
 JoinpointFactory getJoinpointFactory()
          Get the joinpoint factory
 Set<MethodInfo> getMethods()
          Get the method information.
 String getName()
          Get the bean name
 Set<PropertyInfo> getProperties()
          Get the property information.
 Object getProperty(Object bean, String name)
          Get a property
 PropertyInfo getProperty(String name)
          Get a property
 Object invoke(Object bean, String name)
          Invoke a method with no parameters
 Object invoke(Object bean, String name, Class<?>[] paramTypes, Object[] params)
          Invoke a method
 Object invoke(Object bean, String name, String[] paramTypes, Object[] params)
          Invoke a method
 Object invoke(Object bean, String name, TypeInfo[] paramTypes, Object[] params)
          Invoke a method
 Object invokeStatic(String name)
          Invoke a static method with no parameters
 Object invokeStatic(String name, Class<?>[] paramTypes, Object[] params)
          Invoke a static method
 Object invokeStatic(String name, String[] paramTypes, Object[] params)
          Invoke a static method
 Object invokeStatic(String name, TypeInfo[] paramTypes, Object[] params)
          Invoke a static method
 Object newInstance()
          Create a new instance
 Object newInstance(Class<?>[] paramTypes, Object[] params)
          Create a new instance
 Object newInstance(String[] paramTypes, Object[] params)
          Create a new instance
 Object newInstance(TypeInfo[] paramTypes, Object[] params)
          Create a new instance
 void setConstructors(Set<ConstructorInfo> constructors)
          Set the constructor info.
 void setEvents(Set<EventInfo> events)
          set the event information.
 void setMethods(Set<MethodInfo> methods)
          Set the method information.
 void setProperties(Set<PropertyInfo> properties)
          Set the property information.
 void setProperty(Object bean, String name, Object value)
          Get a property
 void toShortString(org.jboss.util.JBossStringBuilder buffer)
           
 void toString(org.jboss.util.JBossStringBuilder buffer)
           
 
Methods inherited from class org.jboss.util.JBossObject
cacheGetHashCode, cacheToString, clone, equals, flushJBossObjectCache, getClassShortName, hashCode, list, notEqual, toShortString, toString, toStringImplementation
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString
 

Field Detail

name

protected String name
The class name


classAdapter

protected ClassAdapter classAdapter
The class adapter


properties

protected Set<PropertyInfo> properties
The properties


constructors

protected Set<ConstructorInfo> constructors
The constructors


methods

protected Set<MethodInfo> methods
The methods


events

protected Set<EventInfo> events
The events


beanInfoFactory

protected BeanInfoFactory beanInfoFactory
The BeanInfoFactory

Constructor Detail

AbstractBeanInfo

public AbstractBeanInfo(BeanInfoFactory beanInfoFactory,
                        ClassAdapter classAdapter,
                        Set<PropertyInfo> properties,
                        Set<ConstructorInfo> constructors,
                        Set<MethodInfo> methods,
                        Set<EventInfo> events)
Create a new bean info

Parameters:
beanInfoFactory - the bean info factory
classAdapter - the class adapter
properties - the properties
constructors - the constructors
methods - the methods
events - the events
Method Detail

getName

public String getName()
Description copied from interface: BeanInfo
Get the bean name

Specified by:
getName in interface BeanInfo
Returns:
the name

getProperties

public Set<PropertyInfo> getProperties()
Description copied from interface: BeanInfo
Get the property information.

Specified by:
getProperties in interface BeanInfo
Returns:
a Set

setProperties

public void setProperties(Set<PropertyInfo> properties)
Description copied from interface: BeanInfo
Set the property information.

Specified by:
setProperties in interface BeanInfo
Parameters:
properties - a Set

getProperty

public PropertyInfo getProperty(String name)
Get a property

Specified by:
getProperty in interface BeanInfo
Parameters:
name - the property name
Returns:
the property
Throws:
IllegalArgumentException - if there is no such property

getClassInfo

public ClassInfo getClassInfo()
Description copied from interface: BeanInfo
Get the class information

Specified by:
getClassInfo in interface BeanInfo
Returns:
the class information

getJoinpointFactory

public JoinpointFactory getJoinpointFactory()
Description copied from interface: BeanInfo
Get the joinpoint factory

Specified by:
getJoinpointFactory in interface BeanInfo
Returns:
the joinpoint factory

getConstructors

public Set<ConstructorInfo> getConstructors()
Description copied from interface: BeanInfo
Get the constructor info.

Specified by:
getConstructors in interface BeanInfo
Returns:
a Set

setConstructors

public void setConstructors(Set<ConstructorInfo> constructors)
Description copied from interface: BeanInfo
Set the constructor info.

Specified by:
setConstructors in interface BeanInfo
Parameters:
constructors - a Set

getEvents

public Set<EventInfo> getEvents()
Description copied from interface: BeanInfo
Get the event information.

Specified by:
getEvents in interface BeanInfo
Returns:
a Set

setEvents

public void setEvents(Set<EventInfo> events)
Description copied from interface: BeanInfo
set the event information.

Specified by:
setEvents in interface BeanInfo
Parameters:
events - a Set

getMethods

public Set<MethodInfo> getMethods()
Description copied from interface: BeanInfo
Get the method information.

Specified by:
getMethods in interface BeanInfo
Returns:
a Set

setMethods

public void setMethods(Set<MethodInfo> methods)
Description copied from interface: BeanInfo
Set the method information.

Specified by:
setMethods in interface BeanInfo
Parameters:
methods - a Set

getBeanInfoFactory

public BeanInfoFactory getBeanInfoFactory()
Description copied from interface: BeanInfo
Get the bean info factory

Specified by:
getBeanInfoFactory in interface BeanInfo
Returns:
the factory

newInstance

public Object newInstance()
                   throws Throwable
Description copied from interface: BeanInfo
Create a new instance

Specified by:
newInstance in interface BeanInfo
Returns:
the new instance
Throws:
Throwable - for any error

newInstance

public Object newInstance(String[] paramTypes,
                          Object[] params)
                   throws Throwable
Description copied from interface: BeanInfo
Create a new instance

Specified by:
newInstance in interface BeanInfo
Parameters:
paramTypes - the parameter types
params - the parameters
Returns:
the new instance
Throws:
Throwable - for any error

newInstance

public Object newInstance(Class<?>[] paramTypes,
                          Object[] params)
                   throws Throwable
Description copied from interface: BeanInfo
Create a new instance

Specified by:
newInstance in interface BeanInfo
Parameters:
paramTypes - the parameter types
params - the parameters
Returns:
the new instance
Throws:
Throwable - for any error

newInstance

public Object newInstance(TypeInfo[] paramTypes,
                          Object[] params)
                   throws Throwable
Description copied from interface: BeanInfo
Create a new instance

Specified by:
newInstance in interface BeanInfo
Parameters:
paramTypes - the parameter types
params - the parameters
Returns:
the new instance
Throws:
Throwable - for any error

getProperty

public Object getProperty(Object bean,
                          String name)
                   throws Throwable
Description copied from interface: BeanInfo
Get a property

Specified by:
getProperty in interface BeanInfo
Parameters:
bean - the bean
name - the property name
Returns:
the property value
Throws:
Throwable - for any error

setProperty

public void setProperty(Object bean,
                        String name,
                        Object value)
                 throws Throwable
Description copied from interface: BeanInfo
Get a property

Specified by:
setProperty in interface BeanInfo
Parameters:
bean - the bean
name - the property name
value - the property value
Throws:
Throwable - for any error

invoke

public Object invoke(Object bean,
                     String name)
              throws Throwable
Description copied from interface: BeanInfo
Invoke a method with no parameters

Specified by:
invoke in interface BeanInfo
Parameters:
bean - the bean
name - the method name
Returns:
the result
Throws:
Throwable - for any error

invoke

public Object invoke(Object bean,
                     String name,
                     String[] paramTypes,
                     Object[] params)
              throws Throwable
Description copied from interface: BeanInfo
Invoke a method

Specified by:
invoke in interface BeanInfo
Parameters:
bean - the bean
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invoke

public Object invoke(Object bean,
                     String name,
                     Class<?>[] paramTypes,
                     Object[] params)
              throws Throwable
Description copied from interface: BeanInfo
Invoke a method

Specified by:
invoke in interface BeanInfo
Parameters:
bean - the bean
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invoke

public Object invoke(Object bean,
                     String name,
                     TypeInfo[] paramTypes,
                     Object[] params)
              throws Throwable
Description copied from interface: BeanInfo
Invoke a method

Specified by:
invoke in interface BeanInfo
Parameters:
bean - the bean
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invokeStatic

public Object invokeStatic(String name)
                    throws Throwable
Description copied from interface: BeanInfo
Invoke a static method with no parameters

Specified by:
invokeStatic in interface BeanInfo
Parameters:
name - the method name
Returns:
the result
Throws:
Throwable - for any error

invokeStatic

public Object invokeStatic(String name,
                           String[] paramTypes,
                           Object[] params)
                    throws Throwable
Description copied from interface: BeanInfo
Invoke a static method

Specified by:
invokeStatic in interface BeanInfo
Parameters:
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invokeStatic

public Object invokeStatic(String name,
                           Class<?>[] paramTypes,
                           Object[] params)
                    throws Throwable
Description copied from interface: BeanInfo
Invoke a static method

Specified by:
invokeStatic in interface BeanInfo
Parameters:
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invokeStatic

public Object invokeStatic(String name,
                           TypeInfo[] paramTypes,
                           Object[] params)
                    throws Throwable
Description copied from interface: BeanInfo
Invoke a static method

Specified by:
invokeStatic in interface BeanInfo
Parameters:
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

equals

public boolean equals(Object object)
Overrides:
equals in class Object

toString

public void toString(org.jboss.util.JBossStringBuilder buffer)
Overrides:
toString in class org.jboss.util.JBossObject

toShortString

public void toShortString(org.jboss.util.JBossStringBuilder buffer)
Specified by:
toShortString in interface org.jboss.util.JBossInterface
Overrides:
toShortString in class org.jboss.util.JBossObject

getHashCode

public int getHashCode()
Overrides:
getHashCode in class org.jboss.util.JBossObject


Copyright © 2008 JBoss Inc.. All Rights Reserved.