eu.semiramis.policyManager.util
Class PMUtils

java.lang.Object
  extended by eu.semiramis.policyManager.util.PMUtils

public class PMUtils
extends java.lang.Object

This class contains some utility method for policy manager classes.7

Author:
Paolo Roccetti

Constructor Summary
PMUtils()
           
 
Method Summary
static
<T> T
create(java.lang.Class<T> interfaceClass, java.lang.String implementationClassName)
          Creates a new instance of the class from the implementationClassName, and return it as implementation of the interface interfaceClass.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PMUtils

public PMUtils()
Method Detail

create

public static <T> T create(java.lang.Class<T> interfaceClass,
                           java.lang.String implementationClassName)
                throws java.lang.ClassNotFoundException,
                       java.lang.InstantiationException,
                       java.lang.IllegalAccessException
Creates a new instance of the class from the implementationClassName, and return it as implementation of the interface interfaceClass.

Parameters:
implementationClassName - the name of the implementation class
interfaceClass - the interface to return, the implementationClassName is checked to ensure it implements the given interface
Throws:
java.lang.IllegalAccessException - if the ContextHandler implementation class cannot be instantiated
java.lang.InstantiationException - if the ContextHandler implementation class cannot be instantiated
java.lang.ClassNotFoundException - if the ContextHandler implementation class cannot be found