SOAj Consolidated


info.soaj.core.util
Class SjUtilReflection

java.lang.Object
  extended by info.soaj.core.util.SjUtilReflection

public class SjUtilReflection
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.0
Author:
MarvinToll@gtcGroup.com

Field Summary
private static java.lang.String CLASS_NAME
          Class name.
 
Constructor Summary
private SjUtilReflection()
          Constructor - Private
 
Method Summary
static boolean containsGetInstanceMethod(java.lang.Class<?> aClass)
          This method determines if a public 'getInstance' Method is available.
static boolean containsNonPublicArgumentConstructorWithoutAnnotation(java.lang.Class<?> aClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
          This method determines if an accessible 'public' argument constructor is available.
static boolean containsNonPublicNoArgumentConstructor(java.lang.Class<?> aClass)
          This method determines if a non-public accessible no-argument Constructor
static boolean containsNonPublicNoArgumentConstructorWithoutAnnotation(java.lang.Class<?> aClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
          This method determines if a non-public accessible no-argument constructor is available.
static boolean containsPublicArgumentConstructor(java.lang.Class<?> aClass)
          This method determines if an accessible 'public' argument constructor is available.
static boolean containsPublicArgumentConstructorWithoutAnnotation(java.lang.Class<?> aClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
          This method determines if an accessible 'public' argument constructor is available.
static boolean containsPublicConstructor(java.lang.Class<?> aClass)
          This method determines if an accessible 'public' no constructor is available.
static boolean containsPublicNoArgumentConstructor(java.lang.Class<?> aClass)
          This method determines if an accessible 'public' no argument constructor is available.
static boolean containsPublicNoArgumentConstructorWithoutAnnotation(java.lang.Class<?> aClass, java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
          This method determines if an accessible 'public' no argument constructor is available.
private static java.lang.ClassLoader getClassLoader()
          Returns the class classLoader for this class.
static SjAttributesForStreaming getResourceAsStream(java.lang.String resourceName)
          This method attempts returning an InputStream with the resources class loader.
static java.lang.Object instantiateInstance(java.lang.Class<?> aClass, boolean suppressException, java.lang.Object[] constructorParameterValues, java.lang.Class<?>... parameterTypes)
          This method returns an instance of type Object.
static java.lang.Object instantiateInstance(java.lang.Object[] constructorParameterValues, boolean suppressException, java.lang.Class<?> aClass, java.lang.reflect.Constructor<?>[] constructors)
          This method returns an instance of type Object.
static java.lang.Object instantiateInstance(java.lang.Object[] constructorParameterValues, boolean suppressException, java.lang.Class<?> aClass, java.util.List<java.lang.reflect.Constructor<?>> constructorList)
          This method returns an instance of type Object.
static java.lang.Object instantiateInstance(java.lang.String className, boolean suppressException, java.lang.Object[] constructorParameterValues, java.lang.Class<?>... parameterTypes)
          This method returns an instance of type Object.
static java.lang.Object instantiateNoArgumentInstance(java.lang.String className)
          This method returns an instance of type Object.
static java.lang.Object instantiateNoArgumentInstance(java.lang.String className, boolean suppressException)
          This method returns an instance of type Object.
static java.lang.Object instantiateNonPublicInstanceWithParameters(java.lang.Object[] constructorParameterValues, boolean suppressException, java.lang.Class<?> aClass)
          This method returns an instance of type Object.
static java.lang.Object instantiatePublicInstanceWithParameters(java.lang.Object[] constructorParameterValues, boolean suppressException, java.lang.Class<?> aClass)
          This method returns an instance of type Object.
static java.lang.Object instantiatePublicInstanceWithParameters(SjPopulatedClassName className, java.lang.Object[] constructorParameterValues, boolean suppressException)
          This method returns an instance of type Object.
static java.lang.Object instantiateViaGetInstanceMethod(java.lang.Class<?> aClass, java.lang.Class<?>[] methodParameterTypes, java.lang.Object[] methodParameterValues, boolean suppressException)
          This method returns an instance of type Object using a static factory method.
static java.lang.Object instantiateViaGetInstanceMethod(SjPopulatedClassName className, java.lang.Class<?>[] methodParameterTypes, java.lang.Object[] methodParameterValues, boolean suppressException)
          This method returns an instance of type Object using a static factory method.
static java.lang.Object instantiateViaNoArgumentConstructor(java.lang.Class<?> aClass, java.lang.reflect.Constructor<?> constructor)
          This method returns an instance of type Object by invoking the no-argument constructor.
static java.lang.Object instantiateViaNoArgumentConstructor(java.lang.Class<?> aClass, java.lang.reflect.Constructor<?> constructor, boolean suppressException)
          This method returns an instance of type Object by invoking the no-argument constructor.
static java.lang.Object instantiateViaNonPublicNoArgumentConstructor(java.lang.Class<?> aClass, boolean suppressException)
          This method returns an instance of type Object by invoking a non-public no-argument constructor.
static java.lang.Object instantiateViaPublicNoArgumentConstructor(java.lang.Class<?> aClass)
          This method returns an instance of type Object by invoking a 'public' no-argument constructor.
static java.lang.Object instantiateViaPublicNoArgumentConstructor(java.lang.Class<?> aClass, boolean suppressException)
          This method returns an instance of type Object by invoking a 'public' no-argument constructor.
static boolean isConstructorAccessible(java.lang.reflect.Constructor<?> constructor)
          This method verifies a constructor is accessible.
private static java.util.List<java.lang.reflect.Constructor<?>> iterateForNonPublicArgumentConstructors(java.lang.reflect.Constructor<?>[] constructors)
          This method iterates through an array of constructors in pursuit of all accessible argument versions which are returned as a list.
private static java.lang.reflect.Constructor<?> iterateForNonPublicNoArgumentConstructor(java.lang.reflect.Constructor<?>[] constructors)
          This method iterates through an array of constructors in pursuit of a no argument version.
private static java.util.List<java.lang.reflect.Constructor<?>> iterateForPublicArgumentConstructors(java.lang.reflect.Constructor<?>[] constructors)
          This method iterates through an array of constructors in pursuit of all accessible argument versions which are returned as a list.
private static java.lang.reflect.Constructor<?> iterateForPublicNoArgumentConstructor(java.lang.reflect.Constructor<?>[] constructors)
          This method iterates through an array of constructors in pursuit of a no argument version.
static java.lang.Class<java.lang.Object> retrieveClass(java.lang.String className)
          This method attempts retrieving a class with this classes class classLoader, and if unsuccessful then a "Thread" class classLoader.
static
<T> java.lang.Class<T>
retrieveClass(java.lang.String className, java.lang.Class<T> classType)
          This method attempts retrieving a class with this classes class classLoader, and if unsuccessful then a "Thread" class classLoader.
static java.lang.reflect.Method retrieveGetInstanceMethod(java.lang.Class<?> aClass)
          This method returns a public static 'getInstance' Method or null.
static java.util.List<java.lang.reflect.Constructor<?>> retrieveNonPublicArgumentConstructors(java.lang.Class<?> aClass)
          This method returns a list of accessible argument Constructors.
static java.lang.reflect.Constructor<?> retrieveNonPublicNoArgumentConstructor(java.lang.Class<?> aClass)
          This method returns an accessible no-argument Constructor or null.
static java.util.List<java.lang.reflect.Constructor<?>> retrievePublicArgumentConstructors(java.lang.Class<?> aClass)
          This method returns a list of accessible 'public' argument Constructors.
static java.lang.reflect.Constructor<?> retrievePublicNoArgumentConstructor(java.lang.Class<?> aClass)
          This method returns an accessible 'public' no-argument Constructor or null.
private static void throwInstantiationException(java.lang.String className, java.lang.String methodName, boolean suppressException)
           
private static void throwInstantiationException(java.lang.String className, java.lang.String methodName, java.lang.Exception exception, boolean suppressException)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_NAME

private static final java.lang.String CLASS_NAME
Class name.

Constructor Detail

SjUtilReflection

private SjUtilReflection()
Constructor - Private

Method Detail

instantiateNoArgumentInstance

public static java.lang.Object instantiateNoArgumentInstance(java.lang.String className)
This method returns an instance of type Object. An exception is thrown upon failure.

Parameters:
className - The fully qualified name of the desired class to be instantiated.
Returns:
Object - Returns an instantiated instance.

instantiateNoArgumentInstance

public static java.lang.Object instantiateNoArgumentInstance(java.lang.String className,
                                                             boolean suppressException)
                                                      throws SjCoreExceptionInstantiating
This method returns an instance of type Object. If unable to instantiate, an exception is thrown or null returned depending upon a client boolean parameter.

Parameters:
className - The fully qualified name of the desired class to be instantiated.
suppressException - Indicates whether an exception is thrown or null returned in the event of an instantiation failure.
Returns:
Object - Returns an instantiated instance or null.
Throws:
SjCoreExceptionInstantiating

instantiatePublicInstanceWithParameters

public static java.lang.Object instantiatePublicInstanceWithParameters(SjPopulatedClassName className,
                                                                       java.lang.Object[] constructorParameterValues,
                                                                       boolean suppressException)
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:
className - The fully qualified name of the desired class to be instantiated.
constructorParameterValues - An object array of constructor values.
suppressException - Indicates whether an exception is thrown or null returned in the event of an instantiation failure.
Returns:
Object - Returns an instantiated instance or null.

instantiatePublicInstanceWithParameters

public static java.lang.Object instantiatePublicInstanceWithParameters(java.lang.Object[] constructorParameterValues,
                                                                       boolean suppressException,
                                                                       java.lang.Class<?> aClass)
                                                                throws SjCoreExceptionInstantiating
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:
constructorParameterValues - An object array of constructor values.
suppressException - Indicates whether an exception is thrown or null returned in the event of an instantiation failure.
aClass - The class to be instantiated.
Returns:
Object - Returns an instantiated instance or null.
Throws:
SjCoreExceptionInstantiating

instantiateNonPublicInstanceWithParameters

public static java.lang.Object instantiateNonPublicInstanceWithParameters(java.lang.Object[] constructorParameterValues,
                                                                          boolean suppressException,
                                                                          java.lang.Class<?> aClass)
                                                                   throws SjCoreExceptionInstantiating
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:
constructorParameterValues - An object array of constructor values.
suppressException - Indicates whether an exception is thrown or null returned in the event of an instantiation failure.
aClass - The class to be instantiated.
Returns:
Object - Returns an instantiated instance or null.
Throws:
SjCoreExceptionInstantiating

instantiateInstance

public static java.lang.Object instantiateInstance(java.lang.Class<?> aClass,
                                                   boolean suppressException,
                                                   java.lang.Object[] constructorParameterValues,
                                                   java.lang.Class<?>... parameterTypes)
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 -
constructorParameterValues -
suppressException -
parameterTypes -
Returns:
Object - Returns an instantiated instance or null.

instantiateInstance

public static java.lang.Object instantiateInstance(java.lang.String className,
                                                   boolean suppressException,
                                                   java.lang.Object[] constructorParameterValues,
                                                   java.lang.Class<?>... parameterTypes)
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:
className -
constructorParameterValues -
suppressException -
parameterTypes -
Returns:
Object - Returns an instantiated instance or null.

instantiateInstance

public static java.lang.Object instantiateInstance(java.lang.Object[] constructorParameterValues,
                                                   boolean suppressException,
                                                   java.lang.Class<?> aClass,
                                                   java.lang.reflect.Constructor<?>[] constructors)
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:
constructorParameterValues -
suppressException -
aClass -
constructors -
Returns:
Object - Returns an instantiated instance or null.

instantiateInstance

public static java.lang.Object instantiateInstance(java.lang.Object[] constructorParameterValues,
                                                   boolean suppressException,
                                                   java.lang.Class<?> aClass,
                                                   java.util.List<java.lang.reflect.Constructor<?>> constructorList)
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:
constructorParameterValues -
suppressException -
aClass -
constructorList -
Returns:
Object - Returns an instantiated instance or null.

instantiateViaGetInstanceMethod

public static java.lang.Object instantiateViaGetInstanceMethod(SjPopulatedClassName className,
                                                               java.lang.Class<?>[] methodParameterTypes,
                                                               java.lang.Object[] methodParameterValues,
                                                               boolean suppressException)
This method returns an instance of type Object using a static factory method. If unable to instantiate, the method signature includes a parameter indicating whether to throw an exception or return a null.

Parameters:
className - The fully qualified name of the class to be instantiated.
methodParameterTypes - An object array containing types satisfying the static factory method signature.
methodParameterValues - An object array containing values satisfying the static factory method signature.
suppressException - Indicates whether an exception is thrown or null returned in the event of an instantiation failure.
Returns:
Object - Returns an instantiated instance or null.

instantiateViaGetInstanceMethod

public static java.lang.Object instantiateViaGetInstanceMethod(java.lang.Class<?> aClass,
                                                               java.lang.Class<?>[] methodParameterTypes,
                                                               java.lang.Object[] methodParameterValues,
                                                               boolean suppressException)
This method returns an instance of type Object using a static factory method. If unable to instantiate, the method signature includes a parameter indicating whether to throw an exception or return a null.

Parameters:
aClass - The class to be instantiated.
methodParameterTypes - An object array containing types satisfying the static factory method signature.
methodParameterValues - An object array containing values satisfying the static factory method signature.
suppressException - Indicates whether an exception is thrown or null returned in the event of an instantiation failure.
Returns:
Object - Returns an instantiated instance or null.

containsPublicConstructor

public static boolean containsPublicConstructor(java.lang.Class<?> aClass)
This method determines if an accessible 'public' no constructor is available.

Parameters:
aClass - The class to be instantiated.
Returns:
boolean - An accessible 'public' Constructor is available.

containsPublicNoArgumentConstructor

public static boolean containsPublicNoArgumentConstructor(java.lang.Class<?> aClass)
This method determines if an accessible 'public' no argument constructor is available.

Parameters:
aClass - The class to be instantiated.
Returns:
boolean - An accessible 'public' no argument Constructor is available.

containsPublicNoArgumentConstructorWithoutAnnotation

public static boolean containsPublicNoArgumentConstructorWithoutAnnotation(java.lang.Class<?> aClass,
                                                                           java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
This method determines if an accessible 'public' no argument constructor is available. It also checks that a annotation is *not* present.

Parameters:
aClass - The class to be instantiated.
annotation - An annotation that if present causes a return of 'false'.
Returns:
boolean - An accessible 'public' no argument Constructor is available.

containsPublicArgumentConstructor

public static boolean containsPublicArgumentConstructor(java.lang.Class<?> aClass)
This method determines if an accessible 'public' argument constructor is available.

Parameters:
aClass - The class to be instantiated.
Returns:
boolean - An accessible 'public' argument Constructor is available.

containsPublicArgumentConstructorWithoutAnnotation

public static boolean containsPublicArgumentConstructorWithoutAnnotation(java.lang.Class<?> aClass,
                                                                         java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
This method determines if an accessible 'public' argument constructor is available. It also checks that a annotation is *not* present.

Parameters:
aClass - The class to be instantiated.
annotation - An annotation that if present causes a return of 'false'.
Returns:
boolean - An accessible 'public' argument Constructor is available.

containsNonPublicNoArgumentConstructor

public static boolean containsNonPublicNoArgumentConstructor(java.lang.Class<?> aClass)
This method determines if a non-public accessible no-argument Constructor
Parameters:
aClass - The class to be instantiated.
Returns:
boolean - An accessible no argument Constructor is available.

containsNonPublicNoArgumentConstructorWithoutAnnotation

public static boolean containsNonPublicNoArgumentConstructorWithoutAnnotation(java.lang.Class<?> aClass,
                                                                              java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
This method determines if a non-public accessible no-argument constructor is available. It also checks that an annotation is *not* present.

Parameters:
aClass - The class to be instantiated.
annotation - An annotation that if present causes a return of 'false'.
Returns:
boolean - An accessible no argument Constructor is available.

containsNonPublicArgumentConstructorWithoutAnnotation

public static boolean containsNonPublicArgumentConstructorWithoutAnnotation(java.lang.Class<?> aClass,
                                                                            java.lang.Class<? extends java.lang.annotation.Annotation> annotation)
This method determines if an accessible 'public' argument constructor is available. It also checks that a annotation is *not* present.

Parameters:
aClass - The class to be instantiated.
annotation - An annotation that if present causes a return of 'false'.
Returns:
boolean - An accessible 'public' argument Constructor is available.

containsGetInstanceMethod

public static boolean containsGetInstanceMethod(java.lang.Class<?> aClass)
This method determines if a public 'getInstance' Method is available.

Parameters:
aClass - The class to be instantiated.
Returns:
boolean - A public 'getInstance' Method is available.

instantiateViaPublicNoArgumentConstructor

public static java.lang.Object instantiateViaPublicNoArgumentConstructor(java.lang.Class<?> aClass)
                                                                  throws SjCoreExceptionInstantiating
This method returns an instance of type Object by invoking a 'public' no-argument constructor. A class may have many constructors. This overloaded version does not suppress exceptions.

Parameters:
aClass - The class to be instantiated.
Returns:
Object - An instantiated Object (instance).
Throws:
SjCoreExceptionInstantiating

instantiateViaPublicNoArgumentConstructor

public static java.lang.Object instantiateViaPublicNoArgumentConstructor(java.lang.Class<?> aClass,
                                                                         boolean suppressException)
                                                                  throws SjCoreExceptionInstantiating
This method returns an instance of type Object by invoking a 'public' no-argument constructor. A class may have many constructors. Support is provided for suppressing an exception.

Parameters:
aClass - The class to be instantiated.
suppressException - Indicates no exception thrown.
Returns:
Object - An instantiated Object (instance) or null (if exception suppressed).
Throws:
SjCoreExceptionInstantiating

instantiateViaNonPublicNoArgumentConstructor

public static java.lang.Object instantiateViaNonPublicNoArgumentConstructor(java.lang.Class<?> aClass,
                                                                            boolean suppressException)
                                                                     throws SjCoreExceptionInstantiating
This method returns an instance of type Object by invoking a non-public no-argument constructor. A class may have many constructors. Support is provided for suppressing an exception.

Parameters:
aClass - The class to be instantiated.
suppressException - Indicates no exception thrown.
Returns:
Object - An instantiated Object (instance) or null (if exception suppressed).
Throws:
SjCoreExceptionInstantiating

instantiateViaNoArgumentConstructor

public static java.lang.Object instantiateViaNoArgumentConstructor(java.lang.Class<?> aClass,
                                                                   java.lang.reflect.Constructor<?> constructor)
                                                            throws SjCoreExceptionInstantiating
This method returns an instance of type Object by invoking the no-argument constructor. This overloaded version does not suppress exceptions.

Parameters:
aClass - The class to be instantiated.
constructor - A no argument constructor.
Returns:
Object - An instantiated Object (instance).
Throws:
SjCoreExceptionInstantiating

instantiateViaNoArgumentConstructor

public static java.lang.Object instantiateViaNoArgumentConstructor(java.lang.Class<?> aClass,
                                                                   java.lang.reflect.Constructor<?> constructor,
                                                                   boolean suppressException)
                                                            throws SjCoreExceptionInstantiating
This method returns an instance of type Object by invoking the no-argument constructor. Support is provided for suppressing an exception.

Parameters:
aClass - The class to be instantiated.
constructor - A no argument constructor.
suppressException - Indicates no exception thrown.
Returns:
Object - An instantiated Object (instance) or null (if exception suppressed).
Throws:
SjCoreExceptionInstantiating

retrieveClass

public static <T> java.lang.Class<T> retrieveClass(java.lang.String className,
                                                   java.lang.Class<T> classType)
                                        throws java.lang.ClassNotFoundException
This method attempts retrieving a class with this classes class classLoader, and if unsuccessful then a "Thread" class classLoader.

Type Parameters:
T -
Parameters:
className - The fully qualified name of the class to be instantiated.
classType -
Returns:
Class
Throws:
java.lang.ClassNotFoundException

retrieveClass

public static java.lang.Class<java.lang.Object> retrieveClass(java.lang.String className)
                                                       throws java.lang.ClassNotFoundException
This method attempts retrieving a class with this classes class classLoader, and if unsuccessful then a "Thread" class classLoader.

Parameters:
className - The fully qualified name of the class to be instantiated.
Returns:
Class
Throws:
java.lang.ClassNotFoundException

retrievePublicNoArgumentConstructor

public static java.lang.reflect.Constructor<?> retrievePublicNoArgumentConstructor(java.lang.Class<?> aClass)
This method returns an accessible 'public' no-argument Constructor or null.

Parameters:
aClass - The class to be instantiated.
Returns:
Constructor - An accessible no-argument Constructor or null.

retrievePublicArgumentConstructors

public static java.util.List<java.lang.reflect.Constructor<?>> retrievePublicArgumentConstructors(java.lang.Class<?> aClass)
This method returns a list of accessible 'public' argument Constructors.

Parameters:
aClass - The class to be instantiated.
Returns:
List - A list of accessible argument Constructor s.

retrieveNonPublicNoArgumentConstructor

public static java.lang.reflect.Constructor<?> retrieveNonPublicNoArgumentConstructor(java.lang.Class<?> aClass)
This method returns an accessible no-argument Constructor or null.

Parameters:
aClass - The class to be instantiated.
Returns:
Constructor - An accessible no-argument Constructor or null.

retrieveNonPublicArgumentConstructors

public static java.util.List<java.lang.reflect.Constructor<?>> retrieveNonPublicArgumentConstructors(java.lang.Class<?> aClass)
This method returns a list of accessible argument Constructors.

Parameters:
aClass - The class to be instantiated.
Returns:
List - A list of accessible argument Constructors.

retrieveGetInstanceMethod

public static java.lang.reflect.Method retrieveGetInstanceMethod(java.lang.Class<?> aClass)
This method returns a public static 'getInstance' Method or null.

Parameters:
aClass - The class to be instantiated.
Returns:
Method - A static public 'getInstance' Method or null.

isConstructorAccessible

public static boolean isConstructorAccessible(java.lang.reflect.Constructor<?> constructor)
This method verifies a constructor is accessible. Failing that, an attempt is made to 'set' the constructor as accessible. Failing that, 'false' is returned.

Parameters:
constructor - The constructor to be interrogated.
Returns:
boolean - 'True' indicates an accessible constructor.

getResourceAsStream

public static SjAttributesForStreaming getResourceAsStream(java.lang.String resourceName)
                                                    throws java.io.IOException
This method attempts returning an InputStream with the resources class loader. Failing that, a "Thread" class loader is attempted.

Parameters:
resourceName - The resource name.
Returns:
SjAttributesForStreaming
Throws:
java.io.IOException

getClassLoader

private static java.lang.ClassLoader getClassLoader()
Returns the class classLoader for this class.

Returns:
ClassLoader - The class classLoader for this class.

iterateForPublicNoArgumentConstructor

private static java.lang.reflect.Constructor<?> iterateForPublicNoArgumentConstructor(java.lang.reflect.Constructor<?>[] constructors)
This method iterates through an array of constructors in pursuit of a no argument version.

Parameters:
constructors -
Returns:
Constructor

iterateForNonPublicNoArgumentConstructor

private static java.lang.reflect.Constructor<?> iterateForNonPublicNoArgumentConstructor(java.lang.reflect.Constructor<?>[] constructors)
This method iterates through an array of constructors in pursuit of a no argument version.

Parameters:
constructors -
Returns:
Constructor

iterateForPublicArgumentConstructors

private static java.util.List<java.lang.reflect.Constructor<?>> iterateForPublicArgumentConstructors(java.lang.reflect.Constructor<?>[] constructors)
This method iterates through an array of constructors in pursuit of all accessible argument versions which are returned as a list.

Parameters:
constructors -
Returns:
List - A list of accessible argument constructors.

iterateForNonPublicArgumentConstructors

private static java.util.List<java.lang.reflect.Constructor<?>> iterateForNonPublicArgumentConstructors(java.lang.reflect.Constructor<?>[] constructors)
This method iterates through an array of constructors in pursuit of all accessible argument versions which are returned as a list.

Parameters:
constructors -
Returns:
List - A list of accessible argument constructors.

throwInstantiationException

private static void throwInstantiationException(java.lang.String className,
                                                java.lang.String methodName,
                                                boolean suppressException)
                                         throws SjCoreExceptionInstantiating
Parameters:
className -
methodName -
suppressException -
Throws:
SjCoreExceptionInstantiating

throwInstantiationException

private static void throwInstantiationException(java.lang.String className,
                                                java.lang.String methodName,
                                                java.lang.Exception exception,
                                                boolean suppressException)
                                         throws SjCoreExceptionInstantiating
Parameters:
className -
methodName -
exception -
suppressException -
Throws:
SjCoreExceptionInstantiating

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.