org.objectweb.kilim.helpers
Class KilimHelper
java.lang.Object
org.objectweb.kilim.helpers.KilimHelper
- public class KilimHelper
- extends java.lang.Object
A helper class providing simplified ways of creating new Template instances.
- Author:
- delpiano
Method Summary |
static TemplateDescription |
getTemplate(java.lang.String name,
java.lang.Class clazz)
Returns the Template named name , the definition of which will
be loaded with the ClassLoader which loaded the class clazz . |
static Component |
newComponent(java.lang.String name,
java.lang.Class clazz)
Creates a new instance of the Template named name , the definition of which will
be loaded with the ClassLoader which loaded the class clazz . |
static Component |
newComponent(java.lang.String name,
java.lang.Class clazz,
InstanciationStrategy aStrategy)
Creates a new instance of the Template named name , the definition of which will
be loaded with the ClassLoader which loaded the class clazz . |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
parser
private static TemplateDescriptionParser parser
rep
private static ResourceRepository rep
KilimHelper
public KilimHelper()
newComponent
public static Component newComponent(java.lang.String name,
java.lang.Class clazz)
throws ResourceNotFoundException,
KilimException
- Creates a new instance of the Template named
name
, the definition of which will
be loaded with the ClassLoader which loaded the class clazz
.
- Parameters:
name
- the name of the Template that will be instantiated.clazz
- the class used to determine the ClassLoader used to load the Template definition.
- Returns:
- the component instance of the Template
name
- Throws:
ResourceNotFoundException
- :
KilimException
- :
getTemplate
public static TemplateDescription getTemplate(java.lang.String name,
java.lang.Class clazz)
throws ResourceNotFoundException,
KilimException
- Returns the Template named
name
, the definition of which will
be loaded with the ClassLoader which loaded the class clazz
.
- Parameters:
name
- the name of the Template that will be instantiated.clazz
- the class used to determine the ClassLoader used to load the Template definition.
- Returns:
- the Template
name
- Throws:
ResourceNotFoundException
- :
KilimException
- :
newComponent
public static Component newComponent(java.lang.String name,
java.lang.Class clazz,
InstanciationStrategy aStrategy)
throws ResourceNotFoundException,
KilimException
- Creates a new instance of the Template named
name
, the definition of which will
be loaded with the ClassLoader which loaded the class clazz
.
- Parameters:
name
- the name of the Template that will be instantiated.aStrategy
- is the instanciation strategy to be used.clazz
- the class used to determine the ClassLoader used to load the Template definition.
- Returns:
- the component instance of the Template
name
- Throws:
ResourceNotFoundException
- :
KilimException
- :