|
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.JMethodDeclaration
org.multijava.mjc.JConstructorDeclaration
This class represents a constructor in the AST
| Field Summary | |
private boolean |
areParametersComplete
Flag indicates whether any required changes to the parameters for accepting outer this instance have been completed. |
| Fields inherited from class org.multijava.mjc.JMethodDeclaration |
typevariables |
| Fields inherited from class org.multijava.mjc.JMemberDeclaration |
|
| 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 | |
JConstructorDeclaration(TokenReference where,
long modifiers,
String ident)
Constructs an AST node for a default constructor |
|
JConstructorDeclaration(TokenReference where,
long modifiers,
String ident,
JFormalParameter[] parameters,
CClassType[] exceptions,
JConstructorBlock body)
Constructs an AST node for a compiler-generated constructor. |
|
JConstructorDeclaration(TokenReference where,
long modifiers,
String ident,
JFormalParameter[] parameters,
CClassType[] exceptions,
JConstructorBlock body,
JavadocComment javadoc,
JavaStyleComment[] comments)
Construct a node in the parsing tree This method is directly called by the parser |
|
| Method Summary | |
void |
accept(MjcVisitor p)
Accepts the specified visitor |
CMember |
checkInterface(CContextType context)
Checks the basic interfaces to make sure things generally look OK. |
CMethodContextType |
createSelfContext(CClassContextType parent)
Creates a context for this constructor AST node. |
boolean |
hasBody()
|
void |
resolveExtMethods(CContextType context)
Makes sure that all in-scope external generic functions are added to the appropriate augmentation maps before top method searches occur in later passes. |
void |
typecheck(CClassContextType cContext,
CVariableInfoTable instanceInfo)
Typechecks this method declaration. |
void |
typecheck(CContextType context)
Typechecks this method declaration. |
| Methods inherited from class org.multijava.mjc.JMethodDeclaration |
addBridge, addParameter, body, checkInterfaceType, checkOverriding, compareTo, createExtendedClassContext, genCode, getExceptions, ident, isExternal, isOverriding, makeMemberAccess, makeMethodSignature, modifiers, noBodyOK, overriddenMethods, parameters, resolveSpecializers, resolveTopMethods, returnType, setBody, setIdent, setModifiers, setParameters, toString, usesMultipleDispatch |
| 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, wait, wait, wait |
| Methods inherited from interface org.multijava.mjc.JMethodDeclarationType |
addParameter, body, checkInterfaceType, checkOverriding, compareTo, getExceptions, ident, isExternal, isOverriding, modifiers, overriddenMethods, parameters, resolveSpecializers, resolveTopMethods, returnType, setModifiers, setParameters, usesMultipleDispatch |
| 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 |
| Field Detail |
private boolean areParametersComplete
| Constructor Detail |
public JConstructorDeclaration(TokenReference where,
long modifiers,
String ident,
JFormalParameter[] parameters,
CClassType[] exceptions,
JConstructorBlock body,
JavadocComment javadoc,
JavaStyleComment[] comments)
where - the line of this node in the source codemodifiers - list of modifiersident - the name of this methodparameters - the parameters of this methodexceptions - the exceptions throw by this methodbody - the body of this method, or null if abstractjavadoc - is this constructor deprecatedcomments - regular Java comments
public JConstructorDeclaration(TokenReference where,
long modifiers,
String ident)
where - the line of this node in the source codemodifiers - list of modifiersident - the name of this method
public JConstructorDeclaration(TokenReference where,
long modifiers,
String ident,
JFormalParameter[] parameters,
CClassType[] exceptions,
JConstructorBlock body)
ensures areParametersComplete == true;
where - the line of this node in the source codemodifiers - list of modifiersident - the name of this methodparameters - the parameters of this methodexceptions - the exceptions throw by this methodbody - the body of this method, or null if abstract | Method Detail |
public boolean hasBody()
hasBody in interface JMethodDeclarationTypehasBody in class JMethodDeclaration
public CMember checkInterface(CContextType context)
throws PositionedError
also ensures areParametersComplete == true;
checkInterface in interface JMethodDeclarationTypecheckInterface in class JMethodDeclarationPositionedError - an error with reference to the source filepublic void resolveExtMethods(CContextType context)
resolveExtMethods in interface JMethodDeclarationTyperesolveExtMethods in class JMethodDeclaration
public void typecheck(CContextType context)
throws PositionedError
typecheck in interface JMethodDeclarationTypetypecheck in class JMethodDeclarationcontext - the context in which this method appears
PositionedError - if the checks fail and the failure
cannot be recovered from
public void typecheck(CClassContextType cContext,
CVariableInfoTable instanceInfo)
throws PositionedError
typecheck in interface JConstructorDeclarationTypecContext - the context in which this method appearsinstanceInfo - the definite-assignment state of the surrounding
class after instance initializers but before any
constructors
PositionedError - if the checks fail and the failure
cannot be recovered from public CMethodContextType createSelfContext(CClassContextType parent)
createSelfContext in interface JMethodDeclarationTypecreateSelfContext in class JMethodDeclarationparent - the parent contextpublic void accept(MjcVisitor p)
accept in interface JMemberDeclarationTypeaccept in class JMethodDeclarationp - the visitor
|
JML | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||