|
mjc | ||||||||||
| 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.MJTopLevelMethodDeclaration
| Field Summary | |
private CType |
openClassType
The class that this method extends |
private CType |
receiverStaticType
The static type of this method's receiver, i.e., the receiver type of the top method of this generic function |
| Fields inherited from class org.multijava.mjc.JMethodDeclaration |
typevariables |
| 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 | |
MJTopLevelMethodDeclaration(TokenReference where,
long modifiers,
CTypeVariable[] typevariables,
CType returnType,
CType openClassType,
String ident,
JFormalParameter[] parameters,
CClassType[] exceptions,
JBlock body,
JavadocComment javadoc,
JavaStyleComment[] comments)
This class represents a MultiJava external method in the syntax tree 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. |
Object |
clone()
Creates a shallow copy of this. |
int |
compareTo(Object o)
Compares this method to a given method and returns 0 if the methods belong to the same generic function, otherwise returns -1 or +1 to sort the methods. |
CExtendedCompilationUnitContext |
createExtendedCompilationUnitContext(CContextType parent,
CTypeVariable[] typevariables)
|
void |
genCode(CodeSequence code)
Generates a sequence of bytecodes |
CType |
getOpenClassType()
Returns the type that this open member extends |
boolean |
isExternal()
Indicates that this member is external. |
CType |
receiverStaticType()
Returns the static type of this method's receiver, i.e., the receiver type of the top method of this generic function. |
protected void |
registerPendingGFCollection(String packageName)
Registers with the compilation session that an external generic function to which this top-level method will belong is being compiled. |
boolean |
usesMultipleDispatch()
Indicates whether this method uses multiple dispatch |
| Methods inherited from class org.multijava.mjc.JMethodDeclaration |
addBridge, addParameter, body, checkInterfaceType, checkOverriding, createExtendedClassContext, createSelfContext, getExceptions, hasBody, ident, isDeclaredNonNull, isOverriding, makeMemberAccess, makeMethodSignature, modifiers, noBodyOK, overriddenMethods, parameters, resolveExtMethods, resolveSpecializers, resolveTopMethods, returnType, setBody, setIdent, setModifiers, setNonNull, setParameters, toString, typecheck, typevariables |
| 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 |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| 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 CType openClassType
private CType receiverStaticType
| Constructor Detail |
public MJTopLevelMethodDeclaration(TokenReference where,
long modifiers,
CTypeVariable[] typevariables,
CType returnType,
CType openClassType,
String ident,
JFormalParameter[] parameters,
CClassType[] exceptions,
JBlock body,
JavadocComment javadoc,
JavaStyleComment[] comments)
where - the line of this node in the source codemodifiers - list of modifiersreturnType - the return type of this methodopenClassType - the class that this method extendsident - the name of this methodparameters - the parameters of this methodexceptions - the exceptions throw by this methodbody - the body of this methodjavadoc - javadoc comments, including deprecated flagcomments - non-javadoc comments| Method Detail |
protected void registerPendingGFCollection(String packageName)
requires packageName != null && (* any separators in packageName are slashes ('/') not dots ('.') *);
public CType getOpenClassType()
MJTopLevelDeclaration
getOpenClassType in interface MJTopLevelDeclarationpublic CType receiverStaticType()
public boolean isExternal()
isExternal in interface MJTopLevelDeclarationisExternal in class JMethodDeclarationpublic boolean usesMultipleDispatch()
usesMultipleDispatch in interface JMethodDeclarationTypeusesMultipleDispatch in class JMethodDeclaration
public int compareTo(Object o)
throws ClassCastException
compareTo in interface JMethodDeclarationTypecompareTo in class JMethodDeclarationo - the object to be compared against, must be a
JMethodDeclarationType
ClassCastException - if o is not an instance of
CType
public Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
public CMember checkInterface(CContextType context)
throws PositionedError
checkInterface in interface MJTopLevelDeclarationcheckInterface in class JMethodDeclarationcontext - the context in which this method appears
PositionedError - if any checks fail
public CExtendedCompilationUnitContext createExtendedCompilationUnitContext(CContextType parent,
CTypeVariable[] typevariables)
public void accept(MjcVisitor p)
accept in interface MJTopLevelDeclarationaccept in class JMethodDeclarationp - the visitorpublic void genCode(CodeSequence code)
genCode in class JMethodDeclarationcode - the code list
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||