SOAj Consolidated


info.soaj.core.util.internal
Class SjUtilPluginInstantiator

java.lang.Object
  extended by info.soaj.core.util.internal.SjUtilPluginInstantiator

public class SjUtilPluginInstantiator
extends java.lang.Object

This utility class contains static convenience methods for reflective processing.

Copyright (c) 2006 - 2009 by Global Technology Consulting Group, Inc. at gtcGroup.com .

Since:
v. 1.3
Author:
MarvinToll@gtcGroup.com

Constructor Summary
private SjUtilPluginInstantiator()
          Constructor - Private
 
Method Summary
static SjBasePlugin instantiateAndInitialize(java.lang.Class<?> aClass, java.lang.String pluginKey, SjPluginProperties pluginProperties)
          This method returns an instance of type Object.
static SjBasePlugin instantiateInstance(java.lang.Class<?> aClass, SjPopulatedPluginKey populatedPluginKey)
          This method returns an instance of type Object.
static SjBasePlugin instantiateInstance(java.lang.Class<?> aClass, java.lang.String pluginKey)
          This method returns an instance of type Object.
static
<PLUGIN extends SjBasePlugin>
PLUGIN
instantiatePlugin(java.lang.Class<PLUGIN> pluginAbstractClass, java.lang.String pluginKey, boolean suppressException)
          This method is normally used internally by the framework.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SjUtilPluginInstantiator

private SjUtilPluginInstantiator()
Constructor - Private

Method Detail

instantiateAndInitialize

public static SjBasePlugin instantiateAndInitialize(java.lang.Class<?> aClass,
                                                    java.lang.String pluginKey,
                                                    SjPluginProperties pluginProperties)
This method returns an instance of type Object. If unable to instantiate, the method signature includes a parameter indicating whether to throw an exception or return a null. In addition, this method performs all initialization functions without verification.

Parameters:
aClass -
pluginKey -
pluginProperties -
Returns:
Object - Returns an instantiated instance or null.

instantiateInstance

public static SjBasePlugin instantiateInstance(java.lang.Class<?> aClass,
                                               java.lang.String pluginKey)
This method returns an instance of type Object. If unable to instantiate, the method signature includes a parameter indicating whether to throw an exception or return a null.

Parameters:
aClass -
pluginKey -
Returns:
Object - Returns an instantiated instance or null.

instantiateInstance

public static SjBasePlugin instantiateInstance(java.lang.Class<?> aClass,
                                               SjPopulatedPluginKey populatedPluginKey)
This method returns an instance of type Object. If unable to instantiate, the method signature includes a parameter indicating whether to throw an exception or return a null.

Parameters:
aClass -
populatedPluginKey -
Returns:
Object - Returns an instantiated instance or null.

instantiatePlugin

public static <PLUGIN extends SjBasePlugin> PLUGIN instantiatePlugin(java.lang.Class<PLUGIN> pluginAbstractClass,
                                                                     java.lang.String pluginKey,
                                                                     boolean suppressException)
This method is normally used internally by the framework. It is publicly exposed in the unlikely event a plugin needs to be explicitly programmaticaly instantiated.

Type Parameters:
PLUGIN - Generic bounded type parameter.
Parameters:
pluginAbstractClass - Typically the plugin's abstract super class.
pluginKey - The wrapper object containing the descriptor document properties associated with this plugin.
suppressException - Indicate whether an exception should be thrown or null returned.
Returns:
PLUGIN or null.

SOAj Consolidated


Copyright (c) 2006 - 2009 by Global Technology Consulting Group, Inc. at gtcGroup.com.
Use is authorized, provided the source is acknowledged by inclusion of this copyright notice.