org.jboss.beans.info.spi
Interface BeanInfo

All Superinterfaces:
Cloneable, org.jboss.util.JBossInterface
All Known Implementing Classes:
AbstractBeanInfo, AllBeanInfo, FieldBeanInfo, UnmodifiableBeanInfo

public interface BeanInfo
extends org.jboss.util.JBossInterface

Description of a bean.

Version:
$Revision: 70359 $
Author:
Adrian Brock

Method Summary
 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.
 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
 
Methods inherited from interface org.jboss.util.JBossInterface
clone, toShortString, toShortString
 

Method Detail

getName

String getName()
Get the bean name

Returns:
the name

getClassInfo

ClassInfo getClassInfo()
Get the class information

Returns:
the class information

getJoinpointFactory

JoinpointFactory getJoinpointFactory()
Get the joinpoint factory

Returns:
the joinpoint factory

getProperties

Set<PropertyInfo> getProperties()
Get the property information.

Returns:
a Set

setProperties

void setProperties(Set<PropertyInfo> properties)
Set the property information.

Parameters:
properties - a Set

getProperty

PropertyInfo getProperty(String name)
Get a property

Parameters:
name - the property name
Returns:
the property
Throws:
IllegalArgumentException - for a null name or if there is no such property

getConstructors

Set<ConstructorInfo> getConstructors()
Get the constructor info.

Returns:
a Set

setConstructors

void setConstructors(Set<ConstructorInfo> constructors)
Set the constructor info.

Parameters:
constructors - a Set

getMethods

Set<MethodInfo> getMethods()
Get the method information.

Returns:
a Set

setMethods

void setMethods(Set<MethodInfo> methods)
Set the method information.

Parameters:
methods - a Set

getEvents

Set<EventInfo> getEvents()
Get the event information.

Returns:
a Set

setEvents

void setEvents(Set<EventInfo> events)
set the event information.

Parameters:
events - a Set

getBeanInfoFactory

BeanInfoFactory getBeanInfoFactory()
Get the bean info factory

Returns:
the factory

newInstance

Object newInstance()
                   throws Throwable
Create a new instance

Returns:
the new instance
Throws:
Throwable - for any error

newInstance

Object newInstance(String[] paramTypes,
                   Object[] params)
                   throws Throwable
Create a new instance

Parameters:
paramTypes - the parameter types
params - the parameters
Returns:
the new instance
Throws:
Throwable - for any error

newInstance

Object newInstance(Class<?>[] paramTypes,
                   Object[] params)
                   throws Throwable
Create a new instance

Parameters:
paramTypes - the parameter types
params - the parameters
Returns:
the new instance
Throws:
Throwable - for any error

newInstance

Object newInstance(TypeInfo[] paramTypes,
                   Object[] params)
                   throws Throwable
Create a new instance

Parameters:
paramTypes - the parameter types
params - the parameters
Returns:
the new instance
Throws:
Throwable - for any error

getProperty

Object getProperty(Object bean,
                   String name)
                   throws Throwable
Get a property

Parameters:
bean - the bean
name - the property name
Returns:
the property value
Throws:
Throwable - for any error

setProperty

void setProperty(Object bean,
                 String name,
                 Object value)
                 throws Throwable
Get a property

Parameters:
bean - the bean
name - the property name
value - the property value
Throws:
Throwable - for any error

invoke

Object invoke(Object bean,
              String name)
              throws Throwable
Invoke a method with no parameters

Parameters:
bean - the bean
name - the method name
Returns:
the result
Throws:
Throwable - for any error

invoke

Object invoke(Object bean,
              String name,
              String[] paramTypes,
              Object[] params)
              throws Throwable
Invoke a method

Parameters:
bean - the bean
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invoke

Object invoke(Object bean,
              String name,
              Class<?>[] paramTypes,
              Object[] params)
              throws Throwable
Invoke a method

Parameters:
bean - the bean
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invoke

Object invoke(Object bean,
              String name,
              TypeInfo[] paramTypes,
              Object[] params)
              throws Throwable
Invoke a method

Parameters:
bean - the bean
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invokeStatic

Object invokeStatic(String name)
                    throws Throwable
Invoke a static method with no parameters

Parameters:
name - the method name
Returns:
the result
Throws:
Throwable - for any error

invokeStatic

Object invokeStatic(String name,
                    String[] paramTypes,
                    Object[] params)
                    throws Throwable
Invoke a static method

Parameters:
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invokeStatic

Object invokeStatic(String name,
                    Class<?>[] paramTypes,
                    Object[] params)
                    throws Throwable
Invoke a static method

Parameters:
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error

invokeStatic

Object invokeStatic(String name,
                    TypeInfo[] paramTypes,
                    Object[] params)
                    throws Throwable
Invoke a static method

Parameters:
name - the method name
paramTypes - the parameter types
params - the parameters
Returns:
the result
Throws:
Throwable - for any error


Copyright © 2011 JBoss, a division of Red Hat, Inc.. All Rights Reserved.