|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectescjava.AnnotationHandler
This class handles the desugaring of annotations.
Nested Class Summary | |
static class |
AnnotationHandler.CheckPurity
|
static class |
AnnotationHandler.Context
|
static class |
AnnotationHandler.NestedPragmaParser
The routines in this class parse a sequence of ModifierPragma that occur prior to a method or constructor declaration. |
static class |
AnnotationHandler.NonNullExpr
|
Field Summary | |
static LiteralExpr |
F
|
private static ModifierPragma |
heavyweightFlag
|
(package private) static AnnotationHandler.NestedPragmaParser |
specparser
|
static LiteralExpr |
T
|
protected TypeDecl |
td
|
Constructor Summary | |
AnnotationHandler()
|
Method Summary | |
static ExprModifierPragma |
and(java.util.ArrayList a)
Produces an ExprModifierPragma whose expression is the conjunction of all of the expressions in the ExprModifierPragmas in the argument. |
static Expr |
and(Expr e1,
Expr e2)
Produces an expression which is the conjunction of the two expressions. |
static ExprModifierPragma |
and(ExprModifierPragma e1,
ExprModifierPragma e2)
Produces an ExprModifierPragma whose expression is the conjunction of the expressions in the input pragmas. |
static ExprModifierPragma |
andLabeled(java.util.ArrayList a)
The same as and(ArrayList), but produces labelled expressions within the conjunction so that error messages come out with useful locations. |
private void |
checkMaybeAdd(Expr e,
TypeNameVec tv,
int locThrows)
|
void |
checkSignalsOnly(ModifierPragmaVec mpv,
RoutineDecl tde)
|
void |
combineModifies(ModifierPragmaVec list)
|
static ModifiesGroupPragma |
defaultModifies(int loc,
Expr req,
RoutineDecl rd)
|
static VarExprModifierPragma |
defaultSignalsOnly(RoutineDecl tde,
Expr req)
|
void |
deNest(java.util.ArrayList ps,
ModifierPragmaVec prefix,
java.util.ArrayList deNestedSpecs)
|
void |
deNest(ModifierPragmaVec m,
ModifierPragmaVec prefix,
java.util.ArrayList deNestedSpecs)
|
ModifierPragmaVec |
desugar(java.util.ArrayList ps,
RoutineDecl tde)
|
void |
desugar(ModifierPragmaVec m,
java.util.ArrayList requiresList,
ModifierPragmaVec resultList,
RoutineDecl tde)
|
void |
desugar(RoutineDecl tde)
|
void |
desugar(TypeDecl td)
|
protected ModifierPragmaVec |
desugarAnnotations(ModifierPragmaVec pm,
RoutineDecl tde)
|
void |
fixDefaultSpecs(ModifierPragmaVec prefix)
|
Expr |
forallWrap(GenericVarDeclVec foralls,
Expr e)
|
ModifierPragma |
forallWrap(GenericVarDeclVec foralls,
ModifierPragma mp)
|
ModifierPragmaVec |
getNonNull(RoutineDecl rd)
|
void |
handlePragmas(CompilationUnit cu)
This must be called on a compilation unit to get the model imports listed, so that type names used in annotations can be found, and to get model methods put into the class's signature. |
void |
handlePragmas(TypeDeclElem tde)
|
void |
handleTypeDecl(TypeDecl td)
After parsing, but before type checking, we need to convert model methods to regular methods, so that names are resolved correctly; also need to set ACC_PURE bits correctly in all classes so that later checks get done correctly. |
static Expr |
implies(Expr e1,
Expr e2)
Produces an expression which is the implication of the two expressions. |
(package private) static boolean |
isFalse(Expr e)
Returns true if the argument is literally false, and returns false if it is not a literal or is literally true. |
private boolean |
isInSignalsOnlyExpr(Type t,
Expr e,
boolean allowSuperTypes)
|
(package private) static boolean |
isTrue(Expr e)
Returns true if the argument is literally true, and returns false if it is not a literal or is literally false. |
static ExprModifierPragma |
or(java.util.ArrayList a)
Produces an ExprModifierPragma whose expression is the disjunction of all of the expressions in the ExprModifierPragmas in the argument. |
static ExprModifierPragma |
or(ExprModifierPragma e1,
ExprModifierPragma e2)
Produces an ExprModifierPragma whose expression is the disjunction of the expressions in the input pragmas. |
void |
parseAllRoutineSpecs(CompilationUnit ccu)
|
private static void |
print(Expr e)
|
static void |
printSpec(ModifierPragma mp)
|
static void |
printSpecs(RoutineDecl tde)
|
protected void |
process(RoutineDecl tde)
|
void |
process(TypeDeclElem tde)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected TypeDecl td
public static final LiteralExpr T
public static final LiteralExpr F
static AnnotationHandler.NestedPragmaParser specparser
private static ModifierPragma heavyweightFlag
Constructor Detail |
public AnnotationHandler()
Method Detail |
public void handlePragmas(CompilationUnit cu)
public void handleTypeDecl(TypeDecl td)
public void handlePragmas(TypeDeclElem tde)
public void process(TypeDeclElem tde)
protected void process(RoutineDecl tde)
public void desugar(TypeDecl td)
public void desugar(RoutineDecl tde)
public static void printSpecs(RoutineDecl tde)
public static void printSpec(ModifierPragma mp)
protected ModifierPragmaVec desugarAnnotations(ModifierPragmaVec pm, RoutineDecl tde)
public void checkSignalsOnly(ModifierPragmaVec mpv, RoutineDecl tde)
private void checkMaybeAdd(Expr e, TypeNameVec tv, int locThrows)
public ModifierPragmaVec getNonNull(RoutineDecl rd)
public ModifierPragmaVec desugar(java.util.ArrayList ps, RoutineDecl tde)
public void desugar(ModifierPragmaVec m, java.util.ArrayList requiresList, ModifierPragmaVec resultList, RoutineDecl tde)
private boolean isInSignalsOnlyExpr(Type t, Expr e, boolean allowSuperTypes)
public static final VarExprModifierPragma defaultSignalsOnly(RoutineDecl tde, Expr req)
public static final ModifiesGroupPragma defaultModifies(int loc, Expr req, RoutineDecl rd)
public ModifierPragma forallWrap(GenericVarDeclVec foralls, ModifierPragma mp)
public Expr forallWrap(GenericVarDeclVec foralls, Expr e)
public void deNest(java.util.ArrayList ps, ModifierPragmaVec prefix, java.util.ArrayList deNestedSpecs)
public void combineModifies(ModifierPragmaVec list)
public void deNest(ModifierPragmaVec m, ModifierPragmaVec prefix, java.util.ArrayList deNestedSpecs)
public void fixDefaultSpecs(ModifierPragmaVec prefix)
public static Expr and(Expr e1, Expr e2)
public static ExprModifierPragma and(ExprModifierPragma e1, ExprModifierPragma e2)
public static ExprModifierPragma and(java.util.ArrayList a)
public static ExprModifierPragma andLabeled(java.util.ArrayList a)
public static ExprModifierPragma or(ExprModifierPragma e1, ExprModifierPragma e2)
public static ExprModifierPragma or(java.util.ArrayList a)
public static Expr implies(Expr e1, Expr e2)
static boolean isTrue(Expr e)
static boolean isFalse(Expr e)
private static void print(Expr e)
public void parseAllRoutineSpecs(CompilationUnit ccu)
|
ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |