|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jmlspecs.jml4.rac.MethodDeclarationTranslator
public class MethodDeclarationTranslator
Translate a method declaration into RAC code. This class translates a method or constructor declaration into RAC code, and the resulting RAC code may consist of new field and method declarations. Given a method m of class T, this class may produce the following member declarations that need to be added to the owning class T.
minternal$mcheckPre$m$TcheckPost$m$TcheckXPost$m$T
rac$stacki
saveTo$rac$stacki, and
restoreFrom$rac$stackiforClass(JmlTypeDeclaration, VariableGenerator)
or #forInterface(JmlTypeDeclaration, VariableGenerator);
the first is for translating class methods and the second is
for translating interface methods.translate(AbstractMethodDeclaration)
method to translate a method declaration.newFields()
and newMethods().
| Method Summary | |
|---|---|
static MethodDeclarationTranslator |
forClass(JmlTypeDeclaration typeDecl,
VariableGenerator varGen)
Creates a translator for translating methods contained in the given type. |
static MethodDeclarationTranslator |
forInterface(JmlTypeDeclaration typeDecl,
VariableGenerator varGen,
boolean tSpec)
Creates a translator for translating methods contained in the given type. |
boolean |
hasNewFields()
Returns true if new field declarations have been generated during the last translation. |
boolean |
hasNewMethods()
Returns true if new method declarations have been generated during the last translation. |
java.util.List<FieldDeclaration> |
newFields()
Returns a list of new field declarations generated during the last translation that need to be added to the class or interface under translation. |
java.util.List<AbstractMethodDeclaration> |
newMethods()
Returns a list of new method declarations generated during the last translation that need to be added to the class or interface under translation. |
RacResult |
translate(AbstractMethodDeclaration meth)
Translates the given method to RAC code. |
RacResult |
translate(MethodBinding meth)
Translates the given method to RAC code. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MethodDeclarationTranslator forClass(JmlTypeDeclaration typeDecl,
VariableGenerator varGen)
VariableGenerator.forClass().
public static MethodDeclarationTranslator forInterface(JmlTypeDeclaration typeDecl,
VariableGenerator varGen,
boolean tSpec)
VariableGenerator.forClass().
public boolean hasNewFields()
public boolean hasNewMethods()
public java.util.List<FieldDeclaration> newFields()
public java.util.List<AbstractMethodDeclaration> newMethods()
public RacResult translate(AbstractMethodDeclaration meth)
newFields(),
newMethods()public RacResult translate(MethodBinding meth)
newFields(),
newMethods()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||