|
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.multijava.mjc.JMemberDeclaration
org.multijava.mjc.JTypeDeclaration
org.multijava.mjc.JClassDeclaration
org.jmlspecs.checker.JClassDeclarationWrapper
A wrapper class to JClassDeclaration to implement JML-specific
typechecking.
| Nested Class Summary |
| Nested classes inherited from class org.multijava.mjc.JTypeDeclaration |
JTypeDeclaration.WrapResult |
| Field Summary | |
protected boolean |
isRefinedType
|
| Fields inherited from class org.multijava.mjc.JClassDeclaration |
self, superType |
| Fields inherited from class org.multijava.mjc.JTypeDeclaration |
cachedContext, fieldsAndInits, ident, inners, instanceInit, interfaces, methods, modifiers, sourceClass, statInit, typevariables, uniqueSourceClass |
| Fields inherited from class org.multijava.mjc.JMemberDeclaration |
|
| Fields inherited from class org.multijava.mjc.JPhylum |
EMPTY |
| 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 |
| Constructor Summary | |
JClassDeclarationWrapper(TokenReference where,
long modifiers,
String ident,
CClassType superType,
CClassType[] interfaces,
ArrayList methods,
ArrayList inners,
JPhylum[] fieldsAndInits,
JavadocComment javadoc,
JavaStyleComment[] comments)
Constructs a class declaration in the parsing tree. |
|
JClassDeclarationWrapper(TokenReference where,
long modifiers,
String ident,
CTypeVariable[] typevariables,
CClassType superType,
CClassType[] interfaces,
ArrayList methods,
ArrayList inners,
JPhylum[] fieldsAndInits,
JavadocComment javadoc,
JavaStyleComment[] comments,
boolean isRefinedType)
Constructs a class declaration in the parsing tree. |
|
| Method Summary | |
int |
compareTo(Object o)
Compares this to a given object. |
protected JConstructorDeclarationType |
constructDefaultConstructor()
Builds an AST node representing the default constructor for this class. |
boolean |
hasConstructor()
Returns true if this class declaration contains an explicit constructor declaration. |
protected boolean |
inJavaFile()
|
boolean |
isRefinedType()
|
protected CSourceClass |
makeSignature(Main compiler,
CClass owner,
CMemberHost host,
String prefix,
boolean isAnon,
boolean isMember)
Generates the signature object for this class declaration. |
| Methods inherited from class org.multijava.mjc.JClassDeclaration |
accept, checkInitializers, checkInterface, constructInitializers, createContext, ident, preprocessDependencies, resolveSpecializers, setInterfaces, setSuperClass, superName, typecheck |
| Methods inherited from class org.multijava.mjc.JMemberDeclaration |
genComments, getCClass, getField, getMethod, isDeprecated, javadocComment, setInterface |
| 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, fields, fieldsAndInits, generateInterface, getAllMethods, getDefaultConstructor, inners, interfaces, isAtTopLevel, methods, modifiers, owner, resolveTopMethods, setDefaultConstructor, setIdent, setInners, setStatic, syntheticOuterThisInaccessible, translateMJ, 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 |
| Field Detail |
protected boolean isRefinedType
| Constructor Detail |
public JClassDeclarationWrapper(TokenReference where,
long modifiers,
String ident,
CClassType superType,
CClassType[] interfaces,
ArrayList methods,
ArrayList inners,
JPhylum[] fieldsAndInits,
JavadocComment javadoc,
JavaStyleComment[] comments)
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 JTypeDeclarationTypes 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 deprecatedcomments - regular java comments
public JClassDeclarationWrapper(TokenReference where,
long modifiers,
String ident,
CTypeVariable[] typevariables,
CClassType superType,
CClassType[] interfaces,
ArrayList methods,
ArrayList inners,
JPhylum[] fieldsAndInits,
JavadocComment javadoc,
JavaStyleComment[] comments,
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 JTypeDeclarationTypes 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 deprecatedcomments - regular java comments| Method Detail |
protected CSourceClass makeSignature(Main compiler,
CClass owner,
CMemberHost host,
String prefix,
boolean isAnon,
boolean isMember)
JmlSourceClass.
makeSignature in class JTypeDeclarationcompiler - the compiler instance for which this signature is
generatedowner - the class signature singleton for the logical outer
class of this, or null if this is a top level
declarationhost - the signature singleton of the context in which this
is declared, a CCompilationUnit for
top-level declarationsprefix - the prefix prepended to this declaration's
identifier to achieve the fully qualified
name, just the package name (using '/'
separators) for top-level classes, package
name plus $-delimited outer class names plus
synthetic index for inner classesisAnon - true if this is an anonymous class, in which
case the fully qualified name is just
prefix isMember - true if this is a member type, i.e., a nested type
that is not a local type or an anonymous classpublic boolean hasConstructor()
checkInterface
to determine whether or not to create a default
constructor for this type, i.e., when no explicit
constructor is found.
In a refinement chain, if this declaration
is not a '.java' file, then true is returned.
(True is returned because the default constructor should
only be automatically generated for the '.java' file.)
hasConstructor in interface JClassDeclarationTypehasConstructor in class JClassDeclarationprotected JConstructorDeclarationType constructDefaultConstructor()
constructDefaultConstructor in class JClassDeclarationprotected boolean inJavaFile()
public int compareTo(Object o)
throws ClassCastException
JTypeDeclarationalso ensures (* \result == lexically ordered according to the type name *); also requires o != null && !(o instanceof JTypeDeclaration); signals_only ClassCastException;
compareTo in interface ComparablecompareTo in class JTypeDeclarationClassCastExceptionpublic boolean isRefinedType()
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||