| |||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.codegen.jet.JETEmitter
A convenience class for compiling and invoking a template dynamically.
Nested Class Summary | |
protected class | JETEmitter.MyJETCompiler
|
Field Summary | |
protected ClassLoader | classLoader
|
protected List | classpathEntries
|
protected String | encoding
|
protected Method | method
|
protected Object | object
|
protected String | projectName
|
protected String | templateURI
|
protected String[] | templateURIPath
|
Constructor Summary | |
JETEmitter(String templateURI)
Creates an instance with the specified template URI. | |
JETEmitter(String[] templateURIPath,
String relativeTemplateURI)
Creates an instance with the specified template URI path and relative template URI. | |
JETEmitter(String[] templateURIPath,
String relativeTemplateURI,
ClassLoader classLoader)
Creates an instance with the specified template URI path, relative template URI, and class loader. | |
JETEmitter(String[] templateURIPath,
String relativeTemplateURI,
ClassLoader classLoader,
String encoding)
Creates an instance with the specified template URI path, relative template URI, class loader, and encoding. | |
JETEmitter(String templateURI,
ClassLoader classLoader)
Creates an instance with the specified template URI and class loader. |
Method Summary | |
void | addVariable(String variableName,
String pluginID)
Registers the specified classpath variable in the workspace and adds a classpath entry to the classpath entry list. |
String | generate(IProgressMonitor progressMonitor,
Object[] arguments)
Invokes the emitter method on the compiled template and returns the result. |
List | getClasspathEntries()
Returns a list of classpath entries that will be added to the classpath of the internal project where emitted JET templates are compiled. |
Method | getMethod()
Returns the method that will be invoked when generate called. |
Object | getObject()
Returns the object used as input to the template. |
String | getProjectName()
Returns the name of the project where JET templates will be compiled. |
void | initialize(IProgressMonitor progressMonitor)
Compiles the template to set the method will be invoked to generate template results. |
void | setMethod(Method method)
Set the method that will be invoked when generate called. |
void | setObject(Object object)
Sets the object used as input to the template. |
void | setProjectName(String projectName)
Sets the name of the project where JET templates will be compiled. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected String projectName
protected Method method
protected Object object
protected String[] templateURIPath
protected String templateURI
protected ClassLoader classLoader
protected String encoding
protected List classpathEntries
Constructor Detail |
public JETEmitter(String templateURI)
public JETEmitter(String[] templateURIPath, String relativeTemplateURI)
public JETEmitter(String templateURI, ClassLoader classLoader)
public JETEmitter(String[] templateURIPath, String relativeTemplateURI, ClassLoader classLoader)
public JETEmitter(String[] templateURIPath, String relativeTemplateURI, ClassLoader classLoader, String encoding)
Method Detail |
public String getProjectName()
public void setProjectName(String projectName)
public List getClasspathEntries()
This method must be called before initialize or generate are called.
public Object getObject()
public void setObject(Object object)
public Method getMethod()
public void setMethod(Method method)
public void initialize(IProgressMonitor progressMonitor) throws JETException
public void addVariable(String variableName, String pluginID) throws JETException
This method must be called before initialize or generate are called.
The specified plugin ID must be the ID of an existing plugin. The referenced plugin must have at least one runtime library JAR file in its plugin descriptor. If the plugin descriptor's list of runtime libraries contains more than one JAR file, the classpath variable will be bound to the first library in the list.
public String generate(IProgressMonitor progressMonitor, Object[] arguments) throws JETException
|
Copyright 2001-2004 IBM Corporation and others. All Rights Reserved. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |