|
||||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.emf.codegen.jet.JETCompiler
Field Summary | |
---|---|
protected static java.lang.String |
CONSTANT_PREFIX
|
protected long |
constantCount
|
protected java.util.Map |
constantDictionary
|
protected java.util.List |
constants
|
protected boolean |
fNoNewLineForScriptlets
If true, the newline immediately preceding a scriptlet or directive (though not a successful include directive), along with any intervening spaces, will be stripped from the character data. |
protected char[] |
fSavedLine
If fNoNewLineForScriptlets is true, the trailing newline/space sequence is stripped from each character data segment, and stored in this field. |
protected boolean |
fUseStaticFinalConstants
|
protected java.util.List |
generators
|
protected static char[] |
NULL_CHAR_ARRAY
|
protected JETParser |
parser
|
protected JETReader |
reader
|
protected int |
sectionDepth
The depth of the current section, where 0 is outside of any sections. |
protected JETSkeleton |
skeleton
|
protected boolean |
skipping
Whether content is currently being skipped. |
protected java.util.Stack |
skipSections
A stack of sections and whether to start skipping, one from each include with alternative encountered. |
protected java.lang.String |
templateURI
|
protected java.lang.String[] |
templateURIPath
|
protected java.io.PrintWriter |
writer
|
Constructor Summary | |
---|---|
JETCompiler(java.lang.String templateURI)
|
|
JETCompiler(java.lang.String[] templateURIPath,
java.lang.String relativeTemplateURI)
|
|
JETCompiler(java.lang.String[] templateURIPath,
java.lang.String relativeTemplateURI,
java.lang.String encoding)
|
|
JETCompiler(java.lang.String templateURI,
java.io.InputStream inputStream,
java.lang.String encoding)
|
|
JETCompiler(java.lang.String templateURI,
java.lang.String encoding)
|
Method Summary | |
---|---|
void |
addCharDataGenerator(char[] chars)
|
void |
addGenerator(JETGenerator gen)
|
void |
beginPageProcessing()
|
void |
doAddCharDataGenerator(char[] chars)
|
void |
endPageProcessing()
|
static java.lang.String |
find(java.lang.String[] locationURIPath,
java.lang.String relativeLocationURI)
|
static java.lang.String[] |
findLocation(java.lang.String[] locationURIPath,
int start,
java.lang.String relativeLocationURI)
|
void |
generate(java.io.OutputStream oStream)
|
java.lang.String |
getResolvedTemplateURI()
|
JETSkeleton |
getSkeleton()
|
void |
handleCharData(char[] chars)
|
void |
handleDirective(java.lang.String directive,
JETMark start,
JETMark stop,
java.util.Map attributes)
|
void |
handleExpression(JETMark start,
JETMark stop,
java.util.Map attributes)
|
protected void |
handleNewSkeleton()
|
void |
handleScriptlet(JETMark start,
JETMark stop,
java.util.Map attributes)
|
static java.io.InputStream |
openStream(java.lang.String locationURI)
|
void |
parse()
|
protected void |
parse(JETCoreElement[] coreElements,
java.lang.Class[] accept)
|
protected static java.lang.String[] |
resolveLocation(java.lang.String[] templateURIPath,
int start,
java.lang.String baseLocationURI,
java.lang.String locationURI)
|
protected static java.lang.String[] |
resolveLocation(java.lang.String[] templateURIPath,
java.lang.String baseLocationURI,
java.lang.String locationURI)
|
protected char[] |
stripFirstNewLineWithBlanks(char[] chars)
|
protected char[] |
stripLastNewLineWithBlanks(char[] chars)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static final char[] NULL_CHAR_ARRAY
protected java.lang.String[] templateURIPath
protected java.lang.String templateURI
protected JETParser parser
protected JETSkeleton skeleton
protected JETReader reader
protected java.io.PrintWriter writer
protected java.util.List generators
protected java.util.List constants
protected java.util.Map constantDictionary
protected long constantCount
protected boolean fNoNewLineForScriptlets
protected boolean fUseStaticFinalConstants
protected char[] fSavedLine
protected int sectionDepth
protected boolean skipping
protected java.util.Stack skipSections
protected static final java.lang.String CONSTANT_PREFIX
Constructor Detail |
public JETCompiler(java.lang.String templateURI) throws JETException
public JETCompiler(java.lang.String templateURI, java.lang.String encoding) throws JETException
public JETCompiler(java.lang.String templateURI, java.io.InputStream inputStream, java.lang.String encoding) throws JETException
public JETCompiler(java.lang.String[] templateURIPath, java.lang.String relativeTemplateURI) throws JETException
public JETCompiler(java.lang.String[] templateURIPath, java.lang.String relativeTemplateURI, java.lang.String encoding) throws JETException
Method Detail |
public java.lang.String getResolvedTemplateURI()
public void handleDirective(java.lang.String directive, JETMark start, JETMark stop, java.util.Map attributes) throws JETException
handleDirective
in interface JETParseEventListener
JETException
protected void handleNewSkeleton()
public void handleExpression(JETMark start, JETMark stop, java.util.Map attributes) throws JETException
handleExpression
in interface JETParseEventListener
JETException
public void handleScriptlet(JETMark start, JETMark stop, java.util.Map attributes) throws JETException
handleScriptlet
in interface JETParseEventListener
JETException
public void handleCharData(char[] chars) throws JETException
handleCharData
in interface JETParseEventListener
JETException
public void addGenerator(JETGenerator gen) throws JETException
JETException
public void addCharDataGenerator(char[] chars) throws JETException
JETException
public void doAddCharDataGenerator(char[] chars) throws JETException
JETException
protected char[] stripFirstNewLineWithBlanks(char[] chars)
protected char[] stripLastNewLineWithBlanks(char[] chars)
public void beginPageProcessing()
beginPageProcessing
in interface JETParseEventListener
public void endPageProcessing() throws JETException
endPageProcessing
in interface JETParseEventListener
JETException
public void parse() throws JETException
JETException
protected void parse(JETCoreElement[] coreElements, java.lang.Class[] accept) throws JETException
JETException
public void generate(java.io.OutputStream oStream) throws JETException
JETException
public JETSkeleton getSkeleton()
protected static java.lang.String[] resolveLocation(java.lang.String[] templateURIPath, java.lang.String baseLocationURI, java.lang.String locationURI)
protected static java.lang.String[] resolveLocation(java.lang.String[] templateURIPath, int start, java.lang.String baseLocationURI, java.lang.String locationURI)
public static java.lang.String[] findLocation(java.lang.String[] locationURIPath, int start, java.lang.String relativeLocationURI)
public static java.lang.String find(java.lang.String[] locationURIPath, java.lang.String relativeLocationURI)
public static java.io.InputStream openStream(java.lang.String locationURI) throws JETException
JETException
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |