|
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.JInterfaceDeclaration
org.jmlspecs.checker.JInterfaceDeclarationWrapper
This class represents a java interface in the syntax tree
| 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.JInterfaceDeclaration |
|
| 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 | |
JInterfaceDeclarationWrapper(TokenReference where,
long modifiers,
String ident,
CTypeVariable[] typevariables,
CClassType[] interfaces,
ArrayList methods,
ArrayList inners,
JPhylum[] fieldsAndInits,
JavadocComment javadoc,
JavaStyleComment[] comments,
boolean isRefinedType)
Constructs an interface declaration in the parsing tree. |
|
| Method Summary | |
void |
checkInitializers(CContextType context)
Checks the static initializers created during the checkInterface pass and performs some other checks that can be performed simply before full blown typechecking. |
void |
checkInterface(CContextType context)
Checks the basic interfaces to make sure things generally look OK. |
int |
compareTo(Object o)
Compares this to a given object. |
protected JInitializerDeclaration |
constructInitializers(boolean isStatic)
Collects all initializers and builds a single method. |
protected JInitializerDeclaration |
constructStaticInitializers()
Builds and returns static initializers. |
private boolean |
hasModifier(JFieldDeclarationType field,
int mod)
Returns true if the given filed declaration has
the given modifier. |
boolean |
isRefinedType()
|
protected CSourceClass |
makeSignature(Main compiler,
CClass owner,
CMemberHost host,
String prefix,
boolean isAnon,
boolean isMember)
Generates the signature object for this. |
| Methods inherited from class org.multijava.mjc.JInterfaceDeclaration |
accept, createContext, ident, preprocessDependencies, resolveSpecializers, 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 JInterfaceDeclarationWrapper(TokenReference where,
long modifiers,
String ident,
CTypeVariable[] typevariables,
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 classinterfaces - 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 commentsJMethodDeclarationType,
JFieldDeclarationType,
JClassBlock| 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 class
public void checkInterface(CContextType context)
throws PositionedError
checkInterface in interface JTypeDeclarationTypecheckInterface in class JInterfaceDeclarationcontext - the context in which this
declaration appears
PositionedError - an error with reference to
the source file
public void checkInitializers(CContextType context)
throws PositionedError
checkInitializers in interface JTypeDeclarationTypecheckInitializers in class JInterfaceDeclarationcontext - the context in which this class
declaration appears
PositionedError - if check fails protected JInitializerDeclaration constructStaticInitializers()
static initializers. If there
is no static, this method returns null.
This method is refined here to take into account of model fields.
constructStaticInitializers in class JInterfaceDeclarationprotected JInitializerDeclaration constructInitializers(boolean isStatic)
isStatic - build class (static) or instance initializers?
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()
private boolean hasModifier(JFieldDeclarationType field,
int mod)
true if the given filed declaration has
the given modifier.
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||