ch.sahits.codegen.extensions
Class Generator

java.lang.Object
  extended by ch.sahits.codegen.extensions.Generator

public final class Generator
extends java.lang.Object

This class handels the extension point ch.sahits.codegen.generator

Since:
1.2.0
Author:
Andi Hotz

Constructor Summary
Generator()
           
 
Method Summary
static IGeneralGenerator getGenerator(java.lang.String bundle, java.lang.String className)
          Retrieve a generator instance from the extension registry
static java.util.Map<java.lang.String,java.lang.String> getGenerator4DisplaySelection()
          This methods retrieves the map of generates in the form .
static java.util.List<java.lang.String> getGenerator4Selection()
          This methods retrieves the list of generates in the form bundle@generator.
static IGeneralGeneratorExtension getGeneratorExtension(java.lang.String bundle, java.lang.String name)
          Retrieve the generator extension instance for the generator
static IGeneralGeneratorCollection getGenerators()
          Retrieve all registered generators
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Generator

public Generator()
Method Detail

getGenerators

public static IGeneralGeneratorCollection getGenerators()
Retrieve all registered generators

Returns:
Collection of generators

getGenerator

public static IGeneralGenerator getGenerator(java.lang.String bundle,
                                             java.lang.String className)
Retrieve a generator instance from the extension registry

Parameters:
bundle - name of the bundel the generator is defined in
className - fully qualified class name of the generator
Returns:
Instance of the generator or null

getGeneratorExtension

public static IGeneralGeneratorExtension getGeneratorExtension(java.lang.String bundle,
                                                               java.lang.String name)
Retrieve the generator extension instance for the generator

Parameters:
bundle - nam of the bundle the generator is located in
name - of the generator
Returns:
instance of the generaor representation or null

getGenerator4Selection

public static java.util.List<java.lang.String> getGenerator4Selection()
This methods retrieves the list of generates in the form bundle@generator. If the generator is a JET it is the location of the file else the class name of the generator. This method is not intended for external use.

Returns:
List of generators

getGenerator4DisplaySelection

public static java.util.Map<java.lang.String,java.lang.String> getGenerator4DisplaySelection()
This methods retrieves the map of generates in the form . If the generator is a JET it is the location of the file else the class name. Each display name is unique. Should two generators have the same display name the second and all further will display the key as display name of the generator

Returns:
Map of generators