JavaCompilerCore/doc/Javadoc/mycompiler/MyCompilerAPI.html

418 lines
16 KiB
HTML
Executable File
Raw Blame History

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.5.0_02) on Tue Jun 21 18:36:56 CEST 2005 -->
<TITLE>
MyCompilerAPI
</TITLE>
<META NAME="keywords" CONTENT="mycompiler.MyCompilerAPI interface">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
parent.document.title="MyCompilerAPI";
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MyCompilerAPI.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../mycompiler/MyCompiler.html" title="class in mycompiler"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../mycompiler/SourceFile.html" title="class in mycompiler"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?mycompiler/MyCompilerAPI.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="MyCompilerAPI.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
mycompiler</FONT>
<BR>
Interface MyCompilerAPI</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../mycompiler/MyCompiler.html" title="class in mycompiler">MyCompiler</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>MyCompilerAPI</B></DL>
</PRE>
<P>
Schnittstellen-Klasse zum Compiler. Diese Klasse soll der
IDE als Compiler-API zum Kompilieren einer Quellcode-Datei
dienen und stellt somit die Schnittstelle zur Studienarbeit
von Markus Melzer (Eclipse-Plugin) dar.
<P>
<P>
<DL>
<DT><B>Version:</B></DT>
<DD>$Date: 2005/06/28 19:19:09 $</DD>
<DT><B>Author:</B></DT>
<DD>J<EFBFBD>rg B<>uerle</DD>
</DL>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../mycompiler/MyCompilerAPI.html#codeGeneration()">codeGeneration</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Author: J<>rg B<>uerle<br/>
Generiert den Bytecode und das Class-File f<>r den Syntaxbaum.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../mycompiler/SourceFile.html" title="class in mycompiler">SourceFile</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../mycompiler/MyCompilerAPI.html#getSyntaxTree()">getSyntaxTree</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Author: J<>rg B<>uerle<br/>
Liefert den geparsten Syntaxbaum zur<75>ck.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../mycompiler/MyCompilerAPI.html#init()">init</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Author: J<>rg B<>uerle<br/>
Initialisiert den Compiler</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../mycompiler/MyCompilerAPI.html#parse(java.io.File)">parse</A></B>(java.io.File&nbsp;file)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Author: J<>rg B<>uerle<br/>
Parst eine Quellcodedatei und baut den abstrakten Syntaxbaum auf.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../mycompiler/MyCompilerAPI.html#parse(java.lang.String)">parse</A></B>(java.lang.String&nbsp;srcCode)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Author: J<>rg B<>uerle<br/>
Parst einen String und baut den abstrakten Syntaxbaum auf.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../mycompiler/MyCompilerAPI.html#semanticCheck()">semanticCheck</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Author: J<>rg B<>uerle<br/>
Ruft den Semantik-Check ohne Typrekonstruktion auf.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../mycompiler/MyCompilerAPI.html#setDebugLevel(int)">setDebugLevel</A></B>(int&nbsp;debugLevel)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Author: J<>rg B<>uerle<br/>
Setzt den Debug-Level</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;de.dhbwstuttgart.typeinference.Menge&lt;<A HREF="../mycompiler/mytypereconstruction/CTypeReconstructionResult.html" title="class in mycompiler.mytypereconstruction">CTypeReconstructionResult</A>&gt;</CODE></FONT></TD>
<TD><CODE><B><A HREF="../mycompiler/MyCompilerAPI.html#typeReconstruction()">typeReconstruction</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Author: J<>rg B<>uerle<br/>
Ruft den Typrekonstruktionsalgorithmus auf.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="init()"><!-- --></A><H3>
init</H3>
<PRE>
void <B>init</B>()</PRE>
<DL>
<DD>Author: J<>rg B<>uerle<br/>
Initialisiert den Compiler
<P>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="setDebugLevel(int)"><!-- --></A><H3>
setDebugLevel</H3>
<PRE>
boolean <B>setDebugLevel</B>(int&nbsp;debugLevel)</PRE>
<DL>
<DD>Author: J<>rg B<>uerle<br/>
Setzt den Debug-Level
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>debugLevel</CODE> - Debug-Level
<DT><B>Returns:</B><DD><code>true</code> wenn ein korrekter Wert <20>bergeben worden ist, <code>false</code> sonst.</DL>
</DD>
</DL>
<HR>
<A NAME="parse(java.io.File)"><!-- --></A><H3>
parse</H3>
<PRE>
void <B>parse</B>(java.io.File&nbsp;file)
throws java.io.FileNotFoundException,
java.io.IOException,
<A HREF="../mycompiler/myparser/JavaParser.yyException.html" title="class in mycompiler.myparser">JavaParser.yyException</A></PRE>
<DL>
<DD>Author: J<>rg B<>uerle<br/>
Parst eine Quellcodedatei und baut den abstrakten Syntaxbaum auf.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>file</CODE> - Die Quellcode-Datei
<DT><B>Throws:</B>
<DD><CODE>java.io.FileNotFoundException</CODE> - Wenn die Quellcode-Datei nicht existiert.
<DD><CODE>java.io.IOException</CODE> - Wenn was schief l<>uft.
<DD><CODE>JavaParser.yyException</CODE> - Wenn ein Fehler beim Parsen auftritt.</DL>
</DD>
</DL>
<HR>
<A NAME="parse(java.lang.String)"><!-- --></A><H3>
parse</H3>
<PRE>
void <B>parse</B>(java.lang.String&nbsp;srcCode)
throws java.io.IOException,
<A HREF="../mycompiler/myparser/JavaParser.yyException.html" title="class in mycompiler.myparser">JavaParser.yyException</A></PRE>
<DL>
<DD>Author: J<>rg B<>uerle<br/>
Parst einen String und baut den abstrakten Syntaxbaum auf.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>srcCode</CODE> - Der zu parsende Quellcode
<DT><B>Throws:</B>
<DD><CODE>java.io.IOException</CODE> - Wenn was schief l<>uft.
<DD><CODE>JavaParser.yyException</CODE> - Wenn ein Fehler beim Parsen auftritt.</DL>
</DD>
</DL>
<HR>
<A NAME="semanticCheck()"><!-- --></A><H3>
semanticCheck</H3>
<PRE>
void <B>semanticCheck</B>()
throws java.lang.NullPointerException,
<A HREF="../mycompiler/myexception/SCException.html" title="class in mycompiler.myexception">SCException</A></PRE>
<DL>
<DD>Author: J<>rg B<>uerle<br/>
Ruft den Semantik-Check ohne Typrekonstruktion auf. Diese Methode sollte nicht mehr verwendet werden.
Es wird nicht gew<65>hrleistet, dass sie korrekt arbeitet.<br/>
Stattdessen sollte besser die Methode \code{typeReconstruction()} verwendet werden.
<P>
<DD><DL>
<DT><B>Throws:</B>
<DD><CODE>java.lang.NullPointerException</CODE> - Wenn noch kein abstrakter Syntaxbaum vorhanden ist.
<DD><CODE><A HREF="../mycompiler/myexception/SCException.html" title="class in mycompiler.myexception">SCException</A></CODE> - Wenn ein Fehler beim Semantik-Check auftritt.</DL>
</DD>
</DL>
<HR>
<A NAME="typeReconstruction()"><!-- --></A><H3>
typeReconstruction</H3>
<PRE>
de.dhbwstuttgart.typeinference.Menge&lt;<A HREF="../mycompiler/mytypereconstruction/CTypeReconstructionResult.html" title="class in mycompiler.mytypereconstruction">CTypeReconstructionResult</A>&gt; <B>typeReconstruction</B>()
throws java.lang.NullPointerException,
<A HREF="../mycompiler/myexception/CTypeReconstructionException.html" title="class in mycompiler.myexception">CTypeReconstructionException</A></PRE>
<DL>
<DD>Author: J<>rg B<>uerle<br/>
Ruft den Typrekonstruktionsalgorithmus auf.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>Die Menge aller m<>glichen Typkombinationen
<DT><B>Throws:</B>
<DD><CODE>java.lang.NullPointerException</CODE> - Wenn noch kein abstrakter Syntaxbaum vorhanden ist.
<DD><CODE><A HREF="../mycompiler/myexception/CTypeReconstructionException.html" title="class in mycompiler.myexception">CTypeReconstructionException</A></CODE> - Wenn ein Fehler bei der Typrekonstruktion auftritt.</DL>
</DD>
</DL>
<HR>
<A NAME="getSyntaxTree()"><!-- --></A><H3>
getSyntaxTree</H3>
<PRE>
<A HREF="../mycompiler/SourceFile.html" title="class in mycompiler">SourceFile</A> <B>getSyntaxTree</B>()
throws java.lang.NullPointerException</PRE>
<DL>
<DD>Author: J<>rg B<>uerle<br/>
Liefert den geparsten Syntaxbaum zur<75>ck.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>Die Syntaxb<78>ume
<DT><B>Throws:</B>
<DD><CODE>java.lang.NullPointerException</CODE> - Wenn noch kein Syntaxbaum berechnet worden ist.</DL>
</DD>
</DL>
<HR>
<A NAME="codeGeneration()"><!-- --></A><H3>
codeGeneration</H3>
<PRE>
void <B>codeGeneration</B>()
throws java.lang.NullPointerException</PRE>
<DL>
<DD>Author: J<>rg B<>uerle<br/>
Generiert den Bytecode und das Class-File f<>r den Syntaxbaum.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>syntaxTree</CODE> - Der Syntaxbaum
<DT><B>Throws:</B>
<DD><CODE>java.lang.NullPointerException</CODE> - Wenn noch kein abstrakter Syntaxbaum vorhanden ist.</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/MyCompilerAPI.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-files/index-1.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../mycompiler/MyCompiler.html" title="class in mycompiler"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../mycompiler/SourceFile.html" title="class in mycompiler"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../index.html?mycompiler/MyCompilerAPI.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="MyCompilerAPI.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>