|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jet.core.parser.ast.JETAST
public final class JETAST
The root object of JET AST trees and a factory for JET nodes in that tree.
Field Summary | |
---|---|
static int |
JET_SPEC_V1
Compile to the original JET specification (org.eclipse.emf.codegen). |
static int |
JET_SPEC_V2
Compile according to the JET2 specification (org.eclipse.jet). |
Constructor Summary | |
---|---|
JETAST()
Create an instance |
Method Summary | |
---|---|
Comment |
newComment(int line,
int colOffset,
int start,
int end,
int commentStart,
int commentEnd,
char[] comment)
Create a new Comment element in the AST |
IncludedContent |
newIncludedContent(int line,
int colOffset,
int start,
int end,
java.net.URI baseLocation,
java.lang.String templatePath)
Create a new InludedContent element in the AST |
JavaDeclaration |
newJavaDeclaration(int line,
int colOffset,
int start,
int end,
int javaStart,
int javaEnd,
char[] javaContent)
Create a new Java Declaration element in the AST |
JavaExpression |
newJavaExpression(int line,
int colOffset,
int start,
int end,
int javaStart,
int javaEnd,
char[] javaContent)
Create a new Java Expression element in the AST |
JavaScriptlet |
newJavaScriptlet(int line,
int colOffset,
int start,
int end,
int javaStart,
int javaEnd,
char[] javaContent)
Create a new Java Scriptlet element in the AST |
JETCompilationUnit |
newJETCompilationUnit()
Create a new, unparented JET2Compilation unit that is not based on a template reference |
JETCompilationUnit |
newJETCompilationUnit(java.net.URI baseLocation,
java.lang.String templatePath,
java.lang.String encoding)
Create a new unparented JET2Compilation unit for the given template in the given base location |
JETDirective |
newJETDirective(int line,
int colOffset,
int start,
int end,
java.lang.String directiveName,
java.util.Map attributes)
Create a new Directive element in the AST |
TextElement |
newTextElement(char[] chars)
Create a text element in the AST |
XMLBodyElement |
newXMLBodyElement(int line,
int colOffset,
int start,
int end,
java.lang.String tagName,
java.util.Map attributeMap,
TagDefinition td)
Create a new XML element with body in the AST |
XMLBodyElementEnd |
newXMLBodyElementEnd(int line,
int col,
int start,
int end,
java.lang.String tagName)
Create a new XML end element corresponding to the end of a XMLBodyElement. |
XMLEmptyElement |
newXMLEmptyElement(int line,
int colOffset,
int start,
int end,
java.lang.String tagName,
java.util.Map attributeMap,
TagDefinition td)
Create a new empty XML element in the AST |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int JET_SPEC_V1
JETASTParser
,
Constant Field Valuespublic static final int JET_SPEC_V2
JETASTParser
,
Constant Field ValuesConstructor Detail |
---|
public JETAST()
Method Detail |
---|
public JETCompilationUnit newJETCompilationUnit()
public JETCompilationUnit newJETCompilationUnit(java.net.URI baseLocation, java.lang.String templatePath, java.lang.String encoding)
baseLocation
- templatePath
- encoding
- the template encoding
public TextElement newTextElement(char[] chars)
chars
- the text
public JETDirective newJETDirective(int line, int colOffset, int start, int end, java.lang.String directiveName, java.util.Map attributes)
line
- the start linecolOffset
- the offset within the line of the element's start.start
- the start offset (doc relative)end
- the end offset (doc relative)directiveName
- the directive nameattributes
- a map off attribute names and values
public JavaExpression newJavaExpression(int line, int colOffset, int start, int end, int javaStart, int javaEnd, char[] javaContent)
line
- the start linecolOffset
- the offset within the line of the element's start.start
- the offset of the expression element (doc relative)end
- the end offset of the expression element (doc relative)javaStart
- the offset of the Java code (doc relative)javaEnd
- the end offset of the Java codejavaContent
- the Java content
public JavaScriptlet newJavaScriptlet(int line, int colOffset, int start, int end, int javaStart, int javaEnd, char[] javaContent)
line
- the start linecolOffset
- the offset within the line of the element's start.start
- the offset of the scriptlet element (doc relative)end
- the end offset of the scriplet element (doc relative)javaStart
- the offset of the Java code (doc relative)javaEnd
- the end offset of the Java codejavaContent
- the Java content
public JavaDeclaration newJavaDeclaration(int line, int colOffset, int start, int end, int javaStart, int javaEnd, char[] javaContent)
line
- the start linecolOffset
- the offset within the line of the element's start.start
- the offset of the declaration element (doc relative)end
- the end offset of the declaration element (doc relative)javaStart
- the offset of the Java code (doc relative)javaEnd
- the end offset of the Java codejavaContent
- the Java content
public XMLEmptyElement newXMLEmptyElement(int line, int colOffset, int start, int end, java.lang.String tagName, java.util.Map attributeMap, TagDefinition td)
line
- the start line of the elementcolOffset
- the offset within the line of the element's start.start
- the start offset of the element (doc relative)end
- the end offset of the element (doc relative)tagName
- the QName of the elementattributeMap
- a Map off element attribute names and valuestd
- the TagDefinition of the element
public XMLBodyElement newXMLBodyElement(int line, int colOffset, int start, int end, java.lang.String tagName, java.util.Map attributeMap, TagDefinition td)
line
- the start line of the elementcolOffset
- the offset within the line of the element's start.start
- the start offset of the element (doc relative)end
- the end offset of the element (doc relative)tagName
- the QName of the elementattributeMap
- a Map off element attribute names and valuestd
- the TagDefinition of the tag
public Comment newComment(int line, int colOffset, int start, int end, int commentStart, int commentEnd, char[] comment)
line
- the start line of the elementcolOffset
- the offset within the line of the element's start.start
- the start offset of the element (doc relative)end
- the end offset of the element (doc relative)commentStart
- the start offset of the comment text (doc relative)commentEnd
- the end offset of the comment text (doc relative)comment
- the comment text
public IncludedContent newIncludedContent(int line, int colOffset, int start, int end, java.net.URI baseLocation, java.lang.String templatePath)
line
- the start line of the elementcolOffset
- the offset within the line of the element's start.start
- the start offset of the element (doc relative)end
- the end offset of the element (doc relative)baseLocation
- the base Location URI of the resolved includetemplatePath
- the templatePath (relative to the base location
public XMLBodyElementEnd newXMLBodyElementEnd(int line, int col, int start, int end, java.lang.String tagName)
line
- the start line of the elementcol
- the offset within the line of the element's start.start
- the start offset of the element (doc relative)end
- the end offset of the element (doc relative)tagName
- the fully qualified tag name
|
Copyright 2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |