|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.jet.compiler.JET2ASTElement
org.eclipse.jet.compiler.JET2CompilationUnit
JETCompilationUnit
public final class JET2CompilationUnit
Represent a compilation unit (a template) in the JET2 AST.
Constructor Summary | |
---|---|
JET2CompilationUnit()
Deprecated. |
|
JET2CompilationUnit(org.eclipse.core.resources.IFile file)
Deprecated. |
|
JET2CompilationUnit(org.eclipse.jet.compiler.JET2AST jet2ast,
JETCompilationUnit unit)
Deprecated. |
Method Summary | |
---|---|
void |
accept(JET2ASTVisitor visitor)
Deprecated. Visit the AST and its contained elements. |
void |
addImports(java.util.List list)
Deprecated. |
void |
createProblem(ProblemSeverity error,
int problemId,
java.lang.String message,
java.lang.Object[] messageArgs,
int start,
int end,
int line,
int colOffset)
Deprecated. Create a new problem on the compilation unit |
java.util.List |
getBodyElements()
Deprecated. Return a List of JET2 AST element (@link JETASTElement} instances. |
JETCompilationUnit |
getDelegateCU()
Deprecated. Return the underlying JETCompilationUnit to which this instance delegates. |
java.util.Set |
getImports()
Deprecated. |
java.lang.String |
getOutputJavaClassName()
Deprecated. Return the unqualified name of the Java class into which the compilation unit will be compiled. |
java.lang.String |
getOutputJavaPackage()
Deprecated. Return the name of the Java package to which the compilation unit will be compiled. |
java.util.List |
getProblems()
Deprecated. Return a list of problems discovered in the compilation unit |
TagLibraryReference[] |
getTagLibraryReferences()
Deprecated. Return an array of tag libraries referenced by this template. |
boolean |
hasErrors()
Deprecated. Test if the compilation unit has any errors |
boolean |
hasWarnings()
Deprecated. Test if the compilation unit has any warnings |
void |
parse()
Deprecated. |
void |
parse(java.io.InputStream contents,
java.lang.String charset)
Deprecated. |
void |
parse(java.lang.String document)
Deprecated. |
void |
setOutputJavaClassName(java.lang.String outputJavaClassName)
Deprecated. Set the unqualifeid name of the Java class into which the compilation unit will be compiled. |
void |
setOutputJavaPackage(java.lang.String outputJavaPackage)
Deprecated. Set the Java package into which the compilation unit will be compiled. |
void |
setPredefinedTagLibraries(java.util.Map predefinedLibraryMap)
Deprecated. Define tag library prefixes (and associated tag library ids) that are automatically available to the transform. |
Methods inherited from class org.eclipse.jet.compiler.JET2ASTElement |
---|
getAst, getColumn, getEnd, getLine, getNextElement, getParent, getPrevElement, getStart, removeLineWhenOtherwiseEmpty, setDelegate |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public JET2CompilationUnit()
public JET2CompilationUnit(org.eclipse.core.resources.IFile file)
file
- public JET2CompilationUnit(org.eclipse.jet.compiler.JET2AST jet2ast, JETCompilationUnit unit)
Method Detail |
---|
public void setPredefinedTagLibraries(java.util.Map predefinedLibraryMap)
predefinedLibraryMap
- a map from prefix to tag library id.public void parse(java.lang.String document)
document
- public void parse() throws org.eclipse.core.runtime.CoreException
org.eclipse.core.runtime.CoreException
public void parse(java.io.InputStream contents, java.lang.String charset)
contents
- charset
- public final java.util.List getBodyElements()
List
of JET2 AST element (@link JETASTElement} instances.
public void accept(JET2ASTVisitor visitor)
JET2ASTElement
accept
in class JET2ASTElement
JET2ASTElement.accept(org.eclipse.jet.compiler.JET2ASTVisitor)
public java.util.List getProblems()
Problem
objects. The empty list is returned if no problems were found.public boolean hasErrors()
true
if the compilation unit had errors, false
otherwise.public boolean hasWarnings()
true
if the compilation unit had warnings, false
otherwise.public void createProblem(ProblemSeverity error, int problemId, java.lang.String message, java.lang.Object[] messageArgs, int start, int end, int line, int colOffset)
error
- the severity of the problemproblemId
- the problem id. A value from Problem
static filesmessage
- an error message, with optional replacement tokensmessageArgs
- the error message argumentsstart
- the start offset of the problem (doc relative)end
- the end offset of the problem (doc relative)line
- the line number of the problem (1 based)colOffset
- TODOpublic java.lang.String getOutputJavaPackage()
public java.lang.String getOutputJavaClassName()
public void setOutputJavaClassName(java.lang.String outputJavaClassName)
outputJavaClassName
- The outputJavaClassName to set.public void setOutputJavaPackage(java.lang.String outputJavaPackage)
outputJavaPackage
- The outputJavaPackage to set.public TagLibraryReference[] getTagLibraryReferences()
public void addImports(java.util.List list)
public java.util.Set getImports()
public JETCompilationUnit getDelegateCU()
JETCompilationUnit
to which this instance delegates.
Useful for calling mashing only 0.7.x code with later code.
JETCompilationUnit
|
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 |