org.jboss.kernel.plugins.config
Class Configurator

java.lang.Object
  extended byorg.jboss.joinpoint.plugins.config.Config
      extended byorg.jboss.kernel.plugins.config.Configurator

public class Configurator
extends org.jboss.joinpoint.plugins.config.Config

Configuration utilities.

Version:
$Revision: 1.19 $
Author:
Adrian Brock

Field Summary
 
Fields inherited from class org.jboss.joinpoint.plugins.config.Config
log
 
Constructor Summary
Configurator()
           
 
Method Summary
static void configure(boolean trace, Object object, BeanInfo info, PropertyMetaData metaData)
          Configure a bean property
static void configure(boolean trace, Object object, PropertyInfo info, PropertyMetaData metaData)
          Configure a bean property
static void configure(Object object, BeanInfo info, BeanMetaData metaData)
          Configure a bean
static void configure(Object object, BeanInfo info, PropertyMetaData metaData)
          Configure a bean property
static void configure(Object object, PropertyInfo info, PropertyMetaData metaData)
          Configure a bean property
static org.jboss.joinpoint.spi.ConstructorJoinpoint findConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData)
          Find a constructor
static org.jboss.joinpoint.spi.MethodJoinpoint findMethod(BeanInfo info, String name, List parameters, boolean isStatic, boolean isPublic)
          Find a method
static org.jboss.joinpoint.spi.MethodJoinpoint findMethod(boolean trace, BeanInfo info, String name, List parameters, boolean isStatic, boolean isPublic)
          Find a method
static org.jboss.joinpoint.spi.Joinpoint getConstructorJoinPoint(KernelConfig config, BeanInfo info, ConstructorMetaData metaData, BeanMetaData beanMetaData)
          Get a constructor joinpoint
static Object[] getParameters(boolean trace, org.jboss.reflect.spi.TypeInfo[] pinfos, List parameters)
          Get the parameters
static String[] getParameterTypes(boolean trace, List parameters)
          Get the parameters types
static String[] getParameterTypes(boolean trace, org.jboss.reflect.spi.TypeInfo[] parameters)
          Get the parameters types
static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertyGetterJoinPoint(BeanInfo info, String property)
          Get property getter for an property
static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertyGetterJoinPoint(boolean trace, PropertyInfo info)
          Get an property getter joinpoint
static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertyNullerJoinPoint(BeanInfo info, PropertyMetaData metaData)
          Get property nuller joinpoint for a property
static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertyNullerJoinPoint(PropertyInfo info, PropertyMetaData metaData)
          Get property nuller joinpoint for a property
static Set getPropertyNullerJoinPoints(BeanInfo info, BeanMetaData metaData)
          Get property nuller joinpoints for a bean
static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(BeanInfo info, PropertyMetaData metaData)
          Get property setter for an property
static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(BeanInfo info, String property, ValueMetaData vmd)
          Get property setter for an property
static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(boolean trace, BeanInfo info, PropertyMetaData metaData)
          Get property setter for an property
static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(boolean trace, PropertyInfo info, ValueMetaData metaData)
          Get an property setter joinpoint
static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(PropertyInfo info, PropertyMetaData metaData)
          Get property setter for an property
static Set getPropertySetterJoinPoints(BeanInfo info, BeanMetaData metaData)
          Get the property setters for a bean
static Object instantiate(KernelConfig config, BeanInfo info, BeanMetaData metaData)
          Instantiate a bean
static Object instantiateAndConfigure(KernelConfig config, BeanInfo info, BeanMetaData metaData)
          Instantiate and configure a bean
static org.jboss.reflect.spi.ConstructorInfo resolveConstructor(boolean trace, BeanInfo info, ConstructorMetaData metaData)
          Resolve a constructor
static PropertyInfo resolveProperty(boolean trace, BeanInfo info, String name)
          Get the property info
static void unconfigure(boolean trace, Object object, PropertyInfo info, PropertyMetaData metaData)
          UnConfigure a bean property
static void unconfigure(Object object, BeanInfo info, BeanMetaData metaData)
          Unconfigure a bean
static void unconfigure(Object object, BeanInfo info, PropertyMetaData metaData)
          Unconfigure a bean property
 
Methods inherited from class org.jboss.joinpoint.plugins.config.Config
configure, equals, findConstructorInfo, findFieldInfo, findMethodInfo, getConstructorJoinpoint, getFieldGetJoinpoint, getFieldSetJoinpoint, getMethodJoinpoint, instantiate, invoke, unconfigure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Configurator

public Configurator()
Method Detail

instantiateAndConfigure

public static Object instantiateAndConfigure(KernelConfig config,
                                             BeanInfo info,
                                             BeanMetaData metaData)
                                      throws Throwable
Instantiate and configure a bean

Parameters:
info - the bean info
metaData - the bean metadata
Returns:
the instantiated and configured object
Throws:
Throwabable - for any error
Throwable

instantiate

public static Object instantiate(KernelConfig config,
                                 BeanInfo info,
                                 BeanMetaData metaData)
                          throws Throwable
Instantiate a bean

Parameters:
config - the kernel config
info - the bean info
metaData - the bean metadata
Returns:
the instantiated object
Throws:
Throwable - for any error

getConstructorJoinPoint

public static org.jboss.joinpoint.spi.Joinpoint getConstructorJoinPoint(KernelConfig config,
                                                                        BeanInfo info,
                                                                        ConstructorMetaData metaData,
                                                                        BeanMetaData beanMetaData)
                                                                 throws Throwable
Get a constructor joinpoint

Parameters:
config - the kernel config
info - the bean info
metaData - the constructor metadata
beanMetaData -
Returns:
the joinpoint
Throws:
Throwable - for any error

findConstructor

public static org.jboss.joinpoint.spi.ConstructorJoinpoint findConstructor(boolean trace,
                                                                           BeanInfo info,
                                                                           ConstructorMetaData metaData,
                                                                           BeanMetaData beanMetaData)
                                                                    throws Exception
Find a constructor

Parameters:
trace - whether trace is enabled
info - the bean info
metaData - the constructor metadata
beanMetaData -
Returns:
the constructor join point
Throws:
Exception - for any error

resolveConstructor

public static org.jboss.reflect.spi.ConstructorInfo resolveConstructor(boolean trace,
                                                                       BeanInfo info,
                                                                       ConstructorMetaData metaData)
Resolve a constructor

Parameters:
trace - whether trace is enabled
info - the bean info
metaData - the constructor metadata
Returns:
the constructor info

configure

public static void configure(Object object,
                             BeanInfo info,
                             BeanMetaData metaData)
                      throws Throwable
Configure a bean

Parameters:
object - the object to configure
info - the bean info
metaData - the bean metadata
Throws:
Throwable - for any error

configure

public static void configure(Object object,
                             BeanInfo info,
                             PropertyMetaData metaData)
                      throws Throwable
Configure a bean property

Parameters:
object - the object to configure
info - the bean info
metaData - the property metadata
Throws:
Throwable - for any error

configure

public static void configure(boolean trace,
                             Object object,
                             BeanInfo info,
                             PropertyMetaData metaData)
                      throws Throwable
Configure a bean property

Parameters:
trace - whether trace is enabled
object - the object to configure
info - the bean info
metaData - the property metadata
Throws:
Throwable - for any error

configure

public static void configure(Object object,
                             PropertyInfo info,
                             PropertyMetaData metaData)
                      throws Throwable
Configure a bean property

Parameters:
object - the object to configure
info - the property info
metaData - the property metadata
Throws:
Throwable - for any error

configure

public static void configure(boolean trace,
                             Object object,
                             PropertyInfo info,
                             PropertyMetaData metaData)
                      throws Throwable
Configure a bean property

Parameters:
trace - whether trace is enabled
object - the object to configure
info - the property info
metaData - the property metadata
Throws:
Throwable - for any error

getPropertyGetterJoinPoint

public static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertyGetterJoinPoint(BeanInfo info,
                                                                                    String property)
                                                                             throws Throwable
Get property getter for an property

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

getPropertyGetterJoinPoint

public static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertyGetterJoinPoint(boolean trace,
                                                                                    PropertyInfo info)
                                                                             throws Throwable
Get an property getter joinpoint

Parameters:
trace - whether trace is enabled
info - the property info
Returns:
the joinpoint
Throws:
Throwable - for any error

getPropertySetterJoinPoints

public static Set getPropertySetterJoinPoints(BeanInfo info,
                                              BeanMetaData metaData)
                                       throws Throwable
Get the property setters for a bean

Parameters:
info - the bean info
metaData - the bean metadata
Returns:
the property setters
Throws:
Throwable - for any error

getPropertySetterJoinPoint

public static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(BeanInfo info,
                                                                                    PropertyMetaData metaData)
                                                                             throws Throwable
Get property setter for an property

Parameters:
info - the bean info
metaData - the property metadata
Returns:
the joinpoint
Throws:
Throwable - for any error

getPropertySetterJoinPoint

public static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(boolean trace,
                                                                                    BeanInfo info,
                                                                                    PropertyMetaData metaData)
                                                                             throws Throwable
Get property setter for an property

Parameters:
trace - whether trace is enabled
info - the bean info
metaData - the property metadata
Returns:
the joinpoint
Throws:
Throwable - for any error

getPropertySetterJoinPoint

public static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(PropertyInfo info,
                                                                                    PropertyMetaData metaData)
                                                                             throws Throwable
Get property setter for an property

Parameters:
info - the property info
metaData - the property metadata
Returns:
the joinpoint
Throws:
Throwable - for any error

getPropertySetterJoinPoint

public static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(BeanInfo info,
                                                                                    String property,
                                                                                    ValueMetaData vmd)
                                                                             throws Throwable
Get property setter for an property

Parameters:
info - the bean info
property - the property name
vmd - the value meta data
Returns:
the joinpoint
Throws:
Throwable - for any error

getPropertySetterJoinPoint

public static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertySetterJoinPoint(boolean trace,
                                                                                    PropertyInfo info,
                                                                                    ValueMetaData metaData)
                                                                             throws Throwable
Get an property setter joinpoint

Parameters:
trace - whether trace is enabled
info - the property info
metaData - the value metadata
Returns:
the joinpoint
Throws:
Throwable - for any error

unconfigure

public static void unconfigure(Object object,
                               BeanInfo info,
                               BeanMetaData metaData)
                        throws Throwable
Unconfigure a bean

Parameters:
object - the object to unconfigure
info - the bean info
metaData - the bean metadata
Throws:
Throwable - for any error

unconfigure

public static void unconfigure(Object object,
                               BeanInfo info,
                               PropertyMetaData metaData)
                        throws Throwable
Unconfigure a bean property

Parameters:
object - the object to unconfigure
info - the bean info
metaData - the property metadata
Throws:
Throwable - for any error

unconfigure

public static void unconfigure(boolean trace,
                               Object object,
                               PropertyInfo info,
                               PropertyMetaData metaData)
                        throws Throwable
UnConfigure a bean property

Parameters:
trace - whether trace is enabled
object - the object to configure
info - the property info
metaData - the property metadata
Throws:
Throwable - for any error

getPropertyNullerJoinPoints

public static Set getPropertyNullerJoinPoints(BeanInfo info,
                                              BeanMetaData metaData)
                                       throws Throwable
Get property nuller joinpoints for a bean

Parameters:
info - the bean info
metaData - the bean metadata
Returns:
the join points
Throws:
Throwable - for any error

getPropertyNullerJoinPoint

public static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertyNullerJoinPoint(BeanInfo info,
                                                                                    PropertyMetaData metaData)
                                                                             throws Throwable
Get property nuller joinpoint for a property

Parameters:
info - the bean info
metaData - the property metadata
Returns:
the join point
Throws:
Throwable - for any error

getPropertyNullerJoinPoint

public static org.jboss.joinpoint.spi.TargettedJoinpoint getPropertyNullerJoinPoint(PropertyInfo info,
                                                                                    PropertyMetaData metaData)
                                                                             throws Throwable
Get property nuller joinpoint for a property

Parameters:
info - the property info
metaData - the property metadata
Returns:
the join point
Throws:
Throwable - for any error

resolveProperty

public static PropertyInfo resolveProperty(boolean trace,
                                           BeanInfo info,
                                           String name)
                                    throws Throwable
Get the property info

Parameters:
trace - whether trace is enabled
info - the bean info
name - the property name
Returns:
the property info
Throws:
Throwable - for any error

findMethod

public static org.jboss.joinpoint.spi.MethodJoinpoint findMethod(BeanInfo info,
                                                                 String name,
                                                                 List parameters,
                                                                 boolean isStatic,
                                                                 boolean isPublic)
                                                          throws Throwable
Find a method

Parameters:
info - the bean info
name - the method name
parameters - the parameter metadata
isStatic - whether the method is static
isPublic - whether the method is public
Returns:
the method join point
Throws:
Throwable - for any error

findMethod

public static org.jboss.joinpoint.spi.MethodJoinpoint findMethod(boolean trace,
                                                                 BeanInfo info,
                                                                 String name,
                                                                 List parameters,
                                                                 boolean isStatic,
                                                                 boolean isPublic)
                                                          throws Throwable
Find a method

Parameters:
trace - whether trace is enabled
info - the bean info
name - the method name
parameters - the parameter metadata
isStatic - whether the method is static
isPublic - whether the method is public
Returns:
the method join point
Throws:
Throwable - for any error

getParameterTypes

public static String[] getParameterTypes(boolean trace,
                                         List parameters)
                                  throws Throwable
Get the parameters types

Parameters:
trace - whether trace is enabled
parameters - the parameter metadata
Returns:
an array of parameter types
Throws:
Throwable - for any error

getParameterTypes

public static String[] getParameterTypes(boolean trace,
                                         org.jboss.reflect.spi.TypeInfo[] parameters)
                                  throws Throwable
Get the parameters types

Parameters:
trace - whether trace is enabled
parameters - the parameter types
Returns:
an array of parameter types
Throws:
Throwable - for any error

getParameters

public static Object[] getParameters(boolean trace,
                                     org.jboss.reflect.spi.TypeInfo[] pinfos,
                                     List parameters)
                              throws Throwable
Get the parameters

Parameters:
trace - whether trace is enabled
pinfos - the parameter infos
parameters - the parameter metadata
Returns:
an array of parameters
Throws:
Throwable - for any error


Copyright © 2002 JBoss Group, LLC. All Rights Reserved.