|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.Utils
org.multijava.util.compiler.Phylum
org.multijava.mjc.JPhylum
org.jmlspecs.checker.JmlNode
org.jmlspecs.checker.JmlMemberDeclaration
org.jmlspecs.checker.JmlTypeDeclaration
org.jmlspecs.checker.JmlClassDeclaration
This type represents a java class declaration in the syntax tree.
| Nested Class Summary |
| Nested classes inherited from class org.jmlspecs.checker.JmlNode |
JmlNode.DummyInitializerDeclaration |
| Field Summary | |
protected JClassDeclarationWrapper |
delegee
|
private boolean |
isRacable
Is this class declaration runtime assertion checkable? |
private boolean |
isWeakSubtype
|
| Fields inherited from class org.jmlspecs.checker.JmlTypeDeclaration |
axioms, combinedAxioms, combinedConstraints, combinedInners, combinedInvariants, combinedMethods, combinedRepresentsDecls, combinedVarAssertions, constraints, dataGroupMap, hasBeenCombinedWithRefinedDecl, innerList, interfaceModelFields, interfaceWeaklyFlags, invariants, methodList, modelFields, representsDecls, superClassModelFields, varAssertions |
| Fields inherited from class org.jmlspecs.checker.JmlMemberDeclaration |
refinedDecl, refiningDecl |
| Fields inherited from class org.jmlspecs.checker.JmlNode |
MJCVISIT_MESSAGE |
| Fields inherited from class org.multijava.util.compiler.Phylum |
|
| Fields inherited from class org.multijava.util.Utils |
DBG_LEVEL_HIGH, DBG_LEVEL_LOW, DBG_LEVEL_NO |
| Fields inherited from interface org.multijava.mjc.Constants |
ACC_PURE, AMID_JAVA_MATH, AMID_MAX, AMID_SAFE_MATH, CMP_VERSION, JAV_ASSERTION_ERROR, JAV_CLASS, JAV_CLASSLOADER, JAV_CLASSNOTFOUND_EXCEPTION, JAV_CLONE, JAV_CLONEABLE, JAV_CONSTRUCTOR, JAV_ERROR, JAV_EXCEPTION, JAV_INIT, JAV_LENGTH, JAV_NAME_SEPARATOR, JAV_NOCLASSDEFFOUND_ERROR, JAV_OBJECT, JAV_OUTER_THIS, JAV_RMJ_RUNTIME_EXCEPTION, JAV_RUNTIME, JAV_RUNTIME_EXCEPTION, JAV_SERIALIZABLE, JAV_STATIC_INIT, JAV_STRING, JAV_STRINGBUFFER, JAV_SUPER, JAV_THIS, JAV_THROWABLE, MJ_ANCHOR, OPE_BAND, OPE_BNOT, OPE_BOR, OPE_BSR, OPE_BXOR, OPE_EQ, OPE_GE, OPE_GT, OPE_LAND, OPE_LE, OPE_LNOT, OPE_LOR, OPE_LT, OPE_MINUS, OPE_NE, OPE_PERCENT, OPE_PLUS, OPE_POSTDEC, OPE_POSTINC, OPE_PREDEC, OPE_PREINC, OPE_SIMPLE, OPE_SL, OPE_SLASH, OPE_SR, OPE_STAR, TID_ARRAY, TID_BOOLEAN, TID_BYTE, TID_CHAR, TID_CLASS, TID_DOUBLE, TID_FLOAT, TID_INT, TID_LONG, TID_MAX, TID_SHORT, TID_VOID, UNIV_ARRAY_TMP, UNIV_TMP |
| Constructor Summary | |
protected |
JmlClassDeclaration(TokenReference where,
boolean isWeakSubtype,
boolean[] interfaceWeaklyFlags,
JmlInvariant[] invariants,
JmlConstraint[] constraints,
JmlRepresentsDecl[] representsDecls,
JmlAxiom[] axioms,
JmlVarAssertion[] varAssertions,
JClassDeclarationWrapper delegee)
Constructs a new JML class declaration; clients should use factory method makeInstance instead. |
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor. |
CClassContextType |
createContext(CContextType parent)
Creates a class context for this class declaration. |
boolean |
hasConstructor()
Returns true if this class declaration contains an explicit constructor declaration. |
boolean |
isClass()
Returns true if this is a class declaration. |
boolean |
isRacable()
Is this class declaration runtime assertion checkable? |
boolean |
isWeakSubtype()
|
static JmlClassDeclaration |
makeInstance(TokenReference where,
long modifiers,
String ident,
CClassType superType,
boolean isWeakSubtype,
CClassType[] interfaces,
boolean[] interfaceWeaklyFlags,
ArrayList methods,
ArrayList inners,
JPhylum[] fieldsAndInits,
JmlInvariant[] invariants,
JmlConstraint[] constraints,
JmlRepresentsDecl[] representsDecls,
JmlAxiom[] axioms,
JmlVarAssertion[] varAssertions,
JavadocComment javadoc,
JavaStyleComment[] comment,
boolean isRefinedType)
Constructs a class declaration in the parsing tree. |
void |
resolveSpecializers(CContextType context)
Computes the values of specializer expressions used to dispatch on compile-time constants. |
void |
setInterfaces(CClassType[] interfaces)
Sets the super class |
void |
setRacable()
Indicates that this class declaration is runtime assertion checkable. |
void |
setSuperClass(CClassType superType)
Sets the super class |
String |
superName()
|
| Methods inherited from class org.jmlspecs.checker.JmlMemberDeclaration |
checkRefinedModifiers, findJavaFileInRefinement, genComments, getCClass, getCombinedSpecification, getCombinedVarAssertions, getField, getMethod, getMostRefined, getRefinedMember, getRefiningMember, inBinaryClassFile, isDeprecated, isRefined, isRefiningMember, javadocComment, setRefinedMember, setRefiningMember, stringRepresentation |
| Methods inherited from class org.jmlspecs.checker.JmlNode |
enterSpecScope, enterSpecScope, exitSpecScope, exitSpecScope, privacy, privacyString |
| Methods inherited from class org.multijava.mjc.JPhylum |
check, check, check, check, fail, fail, fail, warn, warn, warn, warn |
| Methods inherited from class org.multijava.util.compiler.Phylum |
getTokenReference, setTokenReference |
| Methods inherited from class org.multijava.util.Utils |
assertTrue, assertTrue, combineArrays, escapeString, escapeString, fail, fail, getFilePath, hasFlag, hasOtherFlags, parsePathParts, relativePathTo, splitQualifiedName, splitQualifiedName, stripJavaModifiers, stripNonJavaModifiers, stripPrivateModifier, unescapeString, vectorToArray, vectorToIntArray |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.multijava.mjc.JTypeDeclarationType |
accumAllTypeSignatures, addMember, cachePassParameters, checkInitializers, checkInterface, fields, fieldsAndInits, generateInterface, getAllMethods, getDefaultConstructor, ident, inners, interfaces, isAtTopLevel, methods, modifiers, owner, preprocessDependencies, resolveTopMethods, setDefaultConstructor, setIdent, setInners, setStatic, syntheticOuterThisInaccessible, translateMJ, typecheck, unsetStatic |
| Methods inherited from interface org.multijava.mjc.JMemberDeclarationType |
genComments, getCClass, getField, getMethod, isDeprecated |
| Methods inherited from interface org.multijava.util.compiler.PhylumType |
getTokenReference, setTokenReference |
| Methods inherited from interface org.multijava.javadoc.Annotatable |
javadocComment |
| Methods inherited from interface org.multijava.mjc.CompilerPassEnterable |
checkInitializers, checkInterface, getTokenReference, preprocessDependencies, resolveSpecializers, translateMJ, typecheck |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Field Detail |
protected JClassDeclarationWrapper delegee
private boolean isWeakSubtype
private boolean isRacable
| Constructor Detail |
protected JmlClassDeclaration(TokenReference where,
boolean isWeakSubtype,
boolean[] interfaceWeaklyFlags,
JmlInvariant[] invariants,
JmlConstraint[] constraints,
JmlRepresentsDecl[] representsDecls,
JmlAxiom[] axioms,
JmlVarAssertion[] varAssertions,
JClassDeclarationWrapper delegee)
makeInstance instead. Because this
class and the super class both hold aliases to the same delegee
(to avoid casts during delegation), this constructor is
private.
| Method Detail |
public static JmlClassDeclaration makeInstance(TokenReference where,
long modifiers,
String ident,
CClassType superType,
boolean isWeakSubtype,
CClassType[] interfaces,
boolean[] interfaceWeaklyFlags,
ArrayList methods,
ArrayList inners,
JPhylum[] fieldsAndInits,
JmlInvariant[] invariants,
JmlConstraint[] constraints,
JmlRepresentsDecl[] representsDecls,
JmlAxiom[] axioms,
JmlVarAssertion[] varAssertions,
JavadocComment javadoc,
JavaStyleComment[] comment,
boolean isRefinedType)
where - the line of this node in the source codemodifiers - the list of modifiers of this classident - the short name of this classsuperType - the name of this class's superclassinterfaces - the names of this types's interfacesmethods - a list of JMethodDeclarationTypes giving the
methods of this typeinners - a list of JTypeDeclarations giving the
inner classes (and interfaces) of this typefieldsAndInits - the fields and initializers of this type,
passed together because the order matters
for class and object initialization, members
of the array should be instances of
JFieldDeclarationType or
JClassBlockjavadoc - javadoc comments including whether this
type declaration is deprecatedcomment - regular java commentsJMethodDeclarationType,
JFieldDeclarationType,
JClassBlockpublic boolean isClass()
public boolean isWeakSubtype()
public boolean isRacable()
public void setRacable()
public void setSuperClass(CClassType superType)
setSuperClass in interface JClassDeclarationTypepublic void setInterfaces(CClassType[] interfaces)
setInterfaces in interface JClassDeclarationTypepublic CClassContextType createContext(CContextType parent)
createContext in interface JClassDeclarationTypeparent - the parent context or null
public String superName()
superName in interface JClassDeclarationTypepublic boolean hasConstructor()
JClassDeclarationTypecheckInterface
to determine whether or not to create a default
constructor for this type.
hasConstructor in interface JClassDeclarationTypepublic void accept(MjcVisitor p)
accept in interface JMemberDeclarationTypeaccept in class JmlMemberDeclarationp - the visitor
public void resolveSpecializers(CContextType context)
throws PositionedError
resolveSpecializers in interface JTypeDeclarationTypecontext - the context in which this class
declaration appears
PositionedError - if the check fails
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||