rcf.core.framework
Class FrameworkHelpers

java.lang.Object
  extended by rcf.core.framework.FrameworkHelpers

@Revision(value="$Revision: 1.10 $",
          date="$Date: 2006/12/13 07:03:25 $",
          tag="$Name:  $")
public abstract class FrameworkHelpers
extends Object

TODO: Javadoc

TODO: Unit tests, Code review, Javadoc review, Seal/Finalize

Version:
$Revision: 1.10 $
Author:
Greg Gibeling

Field Summary
protected static Framework framework
          TODO: Javadoc
 
Constructor Summary
private FrameworkHelpers()
          TODO: Javadoc Dummy constructor to ensure that this class is never instantiated.
 
Method Summary
static Class erase(Type _type)
          TODO: Javadoc
static rcf.core.util.collection.set.ImmutableSet<Class> getClasses(String packageName)
          TODO: Javadoc
static Framework getFramework()
          TODO: Javadoc
static rcf.core.util.collection.set.ImmutableSet<String> getJavaFiles(String packageName)
          TODO: Javadoc
static File getPackageDirectory(String packageName)
          TODO: Javadoc
static rcf.core.util.collection.set.ImmutableSet<String> getPackageNames(String packageName)
          TODO: Javadoc
static rcf.core.util.collection.listset.ListSet<Class> interfaces(boolean includeClasses, Class _class)
          TODO: Javadoc Return a ListSet of all the interfaces which are supported by the specified class or interface.
static Type interfaceType(Class<?> child, Class<?> parent)
          TODO: Javadoc Get the parameterized type of the parent interface relative to the child.
static Class nonPrimitive(Class _class)
          TODO: Javadoc
static Type resolveTypeParameter(TypeVariable typeVariable, ParameterizedType parameterizedType)
          TODO: Javadoc Get the actual type argument which has been substituted for the specified type variable in the specified parameterized type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

framework

protected static Framework framework
TODO: Javadoc

Constructor Detail

FrameworkHelpers

private FrameworkHelpers()
TODO: Javadoc Dummy constructor to ensure that this class is never instantiated.

Method Detail

nonPrimitive

public static final Class nonPrimitive(Class _class)
TODO: Javadoc

Parameters:
_class -
Returns:

erase

public static final Class erase(Type _type)
TODO: Javadoc

Parameters:
_type -
Returns:

getClasses

public static final rcf.core.util.collection.set.ImmutableSet<Class> getClasses(String packageName)
                                                                         throws ClassNotFoundException
TODO: Javadoc

Parameters:
packageName -
Returns:
Throws:
ClassNotFoundException

getFramework

public static final Framework getFramework()
TODO: Javadoc

Returns:

getJavaFiles

public static final rcf.core.util.collection.set.ImmutableSet<String> getJavaFiles(String packageName)
                                                                            throws ClassNotFoundException
TODO: Javadoc

Parameters:
packageName -
Returns:
Throws:
ClassNotFoundException

getPackageDirectory

public static final File getPackageDirectory(String packageName)
                                      throws ClassNotFoundException
TODO: Javadoc

Parameters:
packageName -
Returns:
Throws:
ClassNotFoundException

getPackageNames

public static final rcf.core.util.collection.set.ImmutableSet<String> getPackageNames(String packageName)
                                                                               throws ClassNotFoundException
TODO: Javadoc

Parameters:
packageName -
Returns:
Throws:
ClassNotFoundException

interfaces

public static final rcf.core.util.collection.listset.ListSet<Class> interfaces(boolean includeClasses,
                                                                               Class _class)
TODO: Javadoc Return a ListSet of all the interfaces which are supported by the specified class or interface. This will return the interfaces in their proper order, and will include all interface inherited from superclasses.

Parameters:
includeClasses - TODO
_class - The class to get a listing of interfaces from.
Returns:
A listing of all the interfaces supported by the specified class.

interfaceType

public static final Type interfaceType(Class<?> child,
                                       Class<?> parent)
TODO: Javadoc Get the parameterized type of the parent interface relative to the child. Despite the fact that an interface can be multiply inherited, it must have the same type parameterization, meaning there is a single return value no matter what the inheritance hierarchy.

Parameters:
child - The child class or interface.
parent - The parent interface to get the fully parameterized type of.
Returns:
The fully parameterized type of the parent interface relative to the child. Note that retVal.getRawType() == parent.

resolveTypeParameter

public static final Type resolveTypeParameter(TypeVariable typeVariable,
                                              ParameterizedType parameterizedType)
TODO: Javadoc Get the actual type argument which has been substituted for the specified type variable in the specified parameterized type.

Parameters:
typeVariable - The type variable to get the actual type for.
parameterizedType - The parameterized type to which the variable belongs.
Returns:
The actual type which the specified type variable takes on, in the specified parameterized type.